...

View Full Version : alert popup?



Jason
03-20-2003, 01:37 AM
I read of an alert, but my question is that I query a db to find out if a value exists or not, if it does then do nothing. If it doesn't I want an alert or popup thing to warn the user that there are no values stored in the db for some value. Does that make sense? Can I do it?


Jason

Spookster
03-20-2003, 01:52 AM
Yes in a manner of speaking. You can use PHP to write out the necessary javascript for the alert box.


Once your query or whatever is done and you have a variable set up just for that value then:




$variable = //value from database

if(!is_null($variable)){
echo "<script language=\"Javascript\">";
echo "alert('It was there')";
echo "</script>";
}

Jason
03-20-2003, 02:00 AM
thanks, worked beautifully.....


Jason



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum