web page is blank
Posted: Thu Jul 20, 2006 8:00 am
Pimptastic | Please use
can anyone plz help me...
Pimptastic | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I have developed a simple registration page
http://www.clevelandprayerfestival.com/ ... ation.html
when the user enters the details and clicks on the Submit button...it should goto http://www.clevelandprayerfestival.com/add_entry.php
but the page is blank...my add_entry.php coding is as follows...Code: Select all
<?
//Database information required to connect to database
$servername='localhost';
// username and password to log onto db server
$dbusername='******';
$dbpassword='******';
// name of database
$dbname='guest_registration';
// Connect to Database and select the database to use
$dbi = mysql_connect("$servername","$dbusername","$dbpassword") or
die("I cannot connect to the database. Error :" . mysql_error());
mysql_select_db($dbname,$dbi);
// Get the values posted from the Form in comments.php
$guest_title = $_POST["guest_title"];
$guest_firstname = $_POST["guest_firstname"];
$guest_lastname = $_POST["guest_lastname"];
$guest_address = $_POST["guest_address"];
$guest_city = $_POST["guest_city"];
$guest_state = $_POST["guest_state"];
$guest_zip = $_POST["guest_zip"];
$guest_country = $_POST["guest_country"];
$guest_phoneno = $_POST["guest_phoneno"];
$guest_email = $_POST["guest_email"];
$guest_peoplecount = $_POST["guest_peoplecount"];
$guest_request = $_POST["guest_request"];
// Now let us check if first name is entered or not
if($guest_firstname==""){
die " You haven't Entered Your FirstName. Go back and Enter your FirstName";
}
// Now let us check if lastname is entered or not
if($guest_lastname==""{
die " You haven't Entered Your LastName. Go back and Enter your LastName";
}
// Now let us check if city is entered or not
if($guest_city==""){
die " You haven't Entered the City. Go back and Enter the City";
}
// Now let us check if state is entered or not
if($guest_state==""){
die " You haven't Entered the State. Go back and Enter the State";
}
// now let us check email address
if ($guest_email=="") {
die " You haven't Entered Your Email Address. Go back and Enter your Email Address";
}
// Now let us check if no. of people attending name is entered or not
if($guest_peoplecount==""){
die " You haven't Entered the no. of people attending. Go back and Enter the no. of people attending";
}
$tm=time(); // reading the time of entry
// adding data to mysql database
$sql = "insert into guest_registration(guest_title,guest_firstname,guest_lastname,guest_address,guest_city,guest_state,guest_zip,guest_country,guest_phoneno,guest_email,guest_peoplecount,tm,guest_request) values('$guest_title','$guest_firstname','$guest_lastname','$guest_address','$guest_city','$guest_state','$guest_zip','$guest_country','$guest_phoneno','$guest_email','$guest_peoplecount','$tm','$guest_request')";
$result = mysql_query($sql,$dbi);
If ($result)
{
echo "<center> Your Details have been added to the database<br>";
echo " <a href="view_entry.php">Click here to go back to the
guestbook</a></center>" ;
} else
echo " Your details were not added due to some database problem";
?>Pimptastic | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]