Skip to main content
GameDev.net gamedev.net
🔒 Locked

[web] PHP Alerts

Started by moogle1979 Jan 5, 2009 at 1:29 AM 2 replies 600+ views
Original Post
moogle1979
moogle1979
Is there a way to create &#106avascript type alerts but based on a users actions and only to certain users like with php and sql?
ToohrVyk
ToohrVyk
Sure, you can have the PHP code generate the &#106avascript code for an alert.
<?php if ($user == USER_WITH_ALERT) { ?><script type="text/&#106avascript"&gt;alert("You're a naughty user");&lt;/script&gt;<br>&lt;?php } ?&gt;</pre></code></pre>
Sneftel
Sneftel
Please don't crosspost on these forums.
moogle1979
moogle1979
I am sorry, I tried to keep them 2 separate posts. They did have 2 totally different subjects from each other.


Thank you, that is really helpful, ToohrVyk

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.