Forum Home
Press F1
 
Thread ID: 43524 2004-03-17 09:17:00 Off Topic: Any PHP/MYSQL gurus out there?? prayingmantis (5416) Press F1
Post ID Timestamp Content User
223318 2004-04-21 10:56:00 *bump* :) prayingmantis (5416)
223319 2004-04-30 00:01:00 ** bump ** prayingmantis (5416)
223320 2004-04-30 03:40:00 > Seen now get a error message If my boss miss out a
> required field, now I am wondering, how would I add a
> Thank you message, to tell him that all the info got
> submitted?

Here is the code:

<?php
unset($_POST['submit']); //removes submit field from posted vars
foreach($_POST as $key=>$val) //loops through each posted var once
{
if(!$val) //captures empty fields as well as 0 (zero)
{
$notall = 1; //sets the variable suggesting empty y field
}
}
if($notall == 1)
{
echo "<font color=#FF0000>Please fill out all fields</font>"; //displays the error message if fields are not filled out
//exit(); //exits the PHP script, no more processing script
}
// Thank you messege to be add
//$result = mysql_query($query);

//echo "Thank you! Information entered.\n";

?>

As you can see I tried adding a thank you message, but it did not work :(

Any ideas what I did wrong?

PS: you can see the fill source of the page here: virtualspectator.crediblehost.com
prayingmantis (5416)
1 2 3 4 5