View Full Version : i think its a IF statement someone help
esquirestorm
12-04-2005, 10:30 PM
Umm i got this code well its the end of the code.
// if all validations are passed.
$query=mysql_query("insert into phpbb_raid_signups(event_id,player_id,player_name,player_class,player_username) values('$event_id','$i','$charname','$class','$username')");
echo "<font face='Verdana' size='2' color=green>You have successfully signed up to this raid.<br></font>";
}
basically once the information has been entered someone clicks sign up and it takes them to a page which displaces "you have successfully singed up to this raid" i want a link underneath this text taking them back to homepage, wen i try to add a simple html one i get a MYSQL error. someone help me wit the code please
ralph l mayo
12-04-2005, 10:59 PM
Umm i got this code well its the end of the code.
basically once the information has been entered someone clicks sign up and it takes them to a page which displaces "you have successfully singed up to this raid" i want a link underneath this text taking them back to homepage, wen i try to add a simple html one i get a MYSQL error. someone help me wit the code please
"I think it's an IF statement, someone help!" sounds like a line from the worst horror movie ever.
You should be able to add more HTML inside the quoted echo at the end, eg:
// if all validations are passed.
$query=mysql_query("insert into phpbb_raid_signups(event_id,player_id,player_name,player_class,player_username) values('$event_id','$i','$charname','$class','$username')");
echo "<font face='Verdana' size='2' color=green>You have successfully signed up to this raid.<br></font><a href=\"index.php\">back to index</a>";
}
Note the quote marks are escaped with backslashes.
Element
12-04-2005, 11:00 PM
Umm i got this code well its the end of the code.
basically once the information has been entered someone clicks sign up and it takes them to a page which displaces "you have successfully singed up to this raid" i want a link underneath this text taking them back to homepage, wen i try to add a simple html one i get a MYSQL error. someone help me wit the code please
Lets try this:
$query = @mysql_query("INSERT INTO phpbb_raid_signups (event_id,player_id,player_name,player_class,player_username) VALUES('$event_id','$i','$charname','$class','$username')");
if($query) {
echo "<font face=\"Verdana\" size=\"2\" color=\"green\">You have successfully signed up to this raid, " . $username . ".<br><br><a href=\"index.php\">Go Home</a><br></font>";
} else {
die("There was a problem registering you to the raid!");
}
} // Whats this? Is this part of a if/else statement?
marek_mar
12-04-2005, 11:15 PM
"I think it's an IF statement, someone help!" sounds like a line from the worst horror movie ever.
It's good that the he didn't see the die() function...
Element
12-04-2005, 11:38 PM
LOL :thumbsup:
esquirestorm
12-05-2005, 09:52 AM
hehe sorry for my bad titles :) im still learning and can only get better right ? :thumbsup:
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.