MySQL
Posted: Wed Jan 20, 2010 3:02 pm
Well...
I have:
How can I make it - if they will enter an invalid code it will show a different page?
For example
I have:
Code: Select all
while($info = mysql_fetch_array( $data ))
{
$username = $info['username'];
$password = $info['password'];
$siteurl = $info['siteurl'];
$email = $info['email'];
$sitename = $info['sitename'];
$shortdetails = $info['shortdetails'];
$conf_code = $info['conf_code'];
$details = $info['details'];
if($info['conf_code'] == $confcode){
mysql_query("INSERT INTO site (username, password, siteurl, email, sitename, shortdetails, conf_code, details) VALUES ('$username', '$password', '$siteurl', '$email', '$sitename', '$shortdetails', '$conf_code', $details)")
or die(mysql_error());
mysql_query("DELETE FROM tempsite WHERE conf_code = '$confcode'")
or die(mysql_error());
echo "
<html>
<link rel=\"stylesheet\" href=\"./style.css\" type=\"text/css\"/>
<title>Online Servers | Home</title>
<body>
";
include './includes/menu.php';
include './includes/banner.php';
echo "
<div id=\"content\">
<table id=\"content\">
<tr>
<td><h1>Added!</h1><p>
Your website has been successfully added!
</td>
</tr>
</table>
</div>
</body>
</html>
";
}
}For example
Code: Select all
if($info['conf_code'] == $confcode == null){
blah blah blah
}