Parse error: parse error, expecting `';'' in /../../../../addCouple.php on line 156
Code: Select all
@ $db = mysql_connect("yah", "blah", "blah");
mysql_select_db("registry_DB", $db);
if(!$db)
{
echo "Error: Could not connect to the database. Please try again later.";
exit;
}
$sql = "SELECT uID FROM my_search_table WHERE uID LIKE '%". $uID ."%'";
$query = mysql_query($sql);
do
{
include "rand_gen.inc";
$sql_array = mysql_fetch_array($query);
}
while($uID === $sql_array['uID']) //if there WAS a match in the database
{ //<-- LINE 156.... weird i know...
include "rand_gen.inc";
}
$uID = $_POST['uID'];
$brideFname = $_POST['brideFname'];
$brideLname = $_POST['brideLname'];
$gooomFname = $_POST['groomFname'];
$groomLname = $_POST['groomLname'];
$event_day = $_POST['event_day'];
$event_month = $_POST['event_month'];
$event_year = $_POST['event_year'];
$ship_add = $_POST['ship_add'];
$ship_city = $_POST['ship_city'];
$ship_zip = $_POST['ship_zip'];
$ship_state = $_POST['ship_state'];
//insert row of data into 'my_search_table'
//create table named the unique ID AND a few
//preset columnfield names (registry info)rand_gen.inc is exactly that. it's a random ID generator. as you may be able to tell from my code, after the unique ID is generated it checks the uID column in 'my_search_table' to see if it's already there. if it is, run the ID generator again and again until it doesn't match anything in that column. once it generates a completely unique ID, it inserts all the information entered by the admin into a row in 'my_search_table'. my question is, is it necessary to put 'uID' inside $sql_array['?']... since i'm only selecting one column... is that right? or should i put $uID in there for some reason? am i doing this correctly? HELP ME!!!