Page 1 of 1

webpage is blank

Posted: Thu Jul 20, 2006 8:19 am
by sennat
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

db details -> CREATE TABLE guest_registration ( guest_entryid int(3) NOT NULL auto_increment, guest_title varhcar(10) NOT NULL default '', guest_firstname varchar(50) NOT NULL default '', guest_lastname varchar(50) NOT NULL default '',guest_address varchar(50) NOT NULL default '', guest_city varchar(50) NOT NULL default '',guest_state varchar(50) NOT NULL default '',guest_zip varchar(50) NOT NULL default '',guest_country varchar(50) NOT NULL default '',guest_phoneno varchar(50) NOT NULL default '',guest_email varchar(50) NOT NULL default '',guest_peoplecount int(5) NOT NULL default '', tm varchar(10) NOT NULL default '', guest_request text NOT NULL, UNIQUE KEY guest_entryid (guest_entryid) ) TYPE=MyISAM;

but the page is blank...my add_entry.php coding is as follows...

<?
//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";

?>

can anyone plz help me...

Posted: Thu Jul 20, 2006 8:21 am
by Benjamin
I already answered your question in another (your other, duplicate) post.

Posted: Thu Jul 20, 2006 8:38 am
by JayBird
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:3. Do not make multiple, identical posts. This is viewed as spam and will be deleted.