Proceed form data

how to view form data, echo

Page 1 of 1

13 Replies - 1274 Views - Last Post: 27 June 2009 - 02:37 AM Rate Topic: -----

#1 kosin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 23-December 08

Proceed form data

Posted 26 June 2009 - 10:28 AM

I've a reservation form. I want to see form data. I've also ReservationForm.js, ReservationForm.css. But when I click submit button, nothing happened. Why? PLease, can anyone helps me? Thanks!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
	<title>Hotel Reservation Form </title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="author" content="Dejan Deki" />
	<meta name="description" content="Dejan Deki - chess player, hotel tourism" />
	<meta name="keywords" content="biser, hotel, tourism,ches tournament" />
	<meta name="robots" content="all" />
	<meta name="robots" content="index" />
	<meta name="robots" content="follow" />
	<link rel="alternate" type="application/rss+xml" href="http://www.ptkpanonija.rs/Rss/Feed.xml" title="PTK Panonija"></link>
	<link href="ReservationForm/ReservationForm.css" type="text/css" rel="stylesheet"></link>
	<script type="text/javascript" src="ReservationForm/ReservationForm.js"></script>
	<script type="text/javascript">
	var formlanguage = "en-US"; // set default form language
	/*
	To change form language and validation warnings, set the proper value in the "formlanguage" variable above:
		For English type: "en-US"
		For Serbian type: "sr";
		For German type: "de";
		For French type: "fr";
	
	Localization files are stored in the ReservationForm/Localization folder:
		Serbian language file - ReservationForm/Localization/sr.xml
		English language file - ReservationForm/Localization/en-US.xml
		German language file - ReservationForm/Localization/de.xml
		French language file - ReservationForm/Localization/fr.xml
	*/
	</script>
</head>
<body>
	<!-- reservation form begin -->
	<form id="ReservationForm" action="http://www.ptkpanonija.rs/rezer/ReservationForm/ReservationForm.php" method="post" onsubmit="return validate();" onreset="resetForm();">
		<div class="reservation">
			<fieldset class="personal-data">
				<legend id="personal_info_legend"><!-- --></legend>
				<div>
					<label for="first_name" id="first_name_label"><!-- --></label>
					<input name="first_name" type="text" id="first_name" onkeyup="hideWarning('name_validator');" value="" />
					<div id="name_validator" class="validator display-none"><!-- --></div>
				</div>
				<div>
					<label for="surname" id="surname_label"><!-- --></label>
					<input name="surname" type="text" id="surname" onkeyup="hideWarning('surname_validator');" value="" />
					<div id="surname_validator" class="validator display-none"><!-- --></div>
				</div>
				<br class="break" />
				<div>
					<label for="email" id="email_label"><!-- --></label>
					<input name="email" type="text" id="email" onkeyup="hideWarning('email_validator');" value="" />
					<div id="email_validator" class="validator display-none"><!-- --></div>
				</div>
				<div>
					<label for="phone" id="phone_label"><!-- --></label>
					<input name="phone" type="text" id="phone" value="" onkeyup="hideWarning('phone_validator');" class="text-align-right" />
					<div id="phone_validator" class="validator display-none"><!-- --></div>
				</div>
			</fieldset>
			
			<fieldset>
				<legend id="arrival_legend"><!-- --></legend>
				<div>
					<label for="day_of_arrival" id="day_of_arrival_label"><!-- --></label>
					<select id="day_of_arrival">
						<option value="1" selected="selected">1</option>
						<option value="2">2</option>
						<option value="3">3</option>
						<option value="4">4</option>
						<option value="5">5</option>
						<option value="6">6</option>
						<option value="7">7</option>
						<option value="8">8</option>
						<option value="9">9</option>
						<option value="10">10</option>
						<option value="11">11</option>
						<option value="12">12</option>
						<option value="13">13</option>
						<option value="14">14</option>
						<option value="15">15</option>
						<option value="16">16</option>
						<option value="17">17</option>
						<option value="18">18</option>
						<option value="19">19</option>
						<option value="20">20</option>
						<option value="21">21</option>
						<option value="22">22</option>
						<option value="23">23</option>
						<option value="24">24</option>
						<option value="25">25</option>
						<option value="26">26</option>
						<option value="27">27</option>
						<option value="28">28</option>
						<option value="29">29</option>
						<option value="30">30</option>
						<option value="31">31</option>
					</select>
				</div>
				<div>
					<label for="month_of_arrival" id="month_of_arrival_label"><!-- --></label>
					<select id="month_of_arrival">
						<option value="January" selected="selected">January</option>
						<option value="February">February</option>
						<option value="March">March</option>
						<option value="April">April</option>
						<option value="May">May</option>
						<option value="June">June</option>
						<option value="July">July</option>
						<option value="August">August</option>
						<option value="September">September</option>
						<option value="October">October</option>
						<option value="November">November</option>
						<option value="November">November</option>
					</select>
				</div>
				<div>
					<label for="year_of_arrival" id="year_of_arrival_label"><!-- --></label>
					<select id="year_of_arrival">
						<option value="2007" selected="selected">2007</option>
						<option value="2008">2008</option>
						<option value="2009">2009</option>
						<option value="2010">2010</option>
					</select>
				</div>
			</fieldset>
			
			<fieldset>
				<legend id="departure_legend"><!-- --></legend>
				<div>
					<label for="day_of_departure" id="day_of_departure_label"><!-- --></label>
					<select id="day_of_departure">
						<option value="1" selected="selected">1</option>
						<option value="2">2</option>
						<option value="3">3</option>
						<option value="4">4</option>
						<option value="5">5</option>
						<option value="6">6</option>
						<option value="7">7</option>
						<option value="8">8</option>
						<option value="9">9</option>
						<option value="10">10</option>
						<option value="11">11</option>
						<option value="12">12</option>
						<option value="13">13</option>
						<option value="14">14</option>
						<option value="15">15</option>
						<option value="16">16</option>
						<option value="17">17</option>
						<option value="18">18</option>
						<option value="19">19</option>
						<option value="20">20</option>
						<option value="21">21</option>
						<option value="22">22</option>
						<option value="23">23</option>
						<option value="24">24</option>
						<option value="25">25</option>
						<option value="26">26</option>
						<option value="27">27</option>
						<option value="28">28</option>
						<option value="29">29</option>
						<option value="30">30</option>
						<option value="31">31</option>
					</select>
				</div>
				<div>
					<label for="month_of_departure" id="month_of_departure_label"><!-- --></label>
					<select id="month_of_departure">
						<option value="January" selected="selected">January</option>
						<option value="February">February</option>
						<option value="March">March</option>
						<option value="April">April</option>
						<option value="May">May</option>
						<option value="June">June</option>
						<option value="July">July</option>
						<option value="August">August</option>
						<option value="September">September</option>
						<option value="October">October</option>
						<option value="November">November</option>
						<option value="November">November</option>
					</select>
				</div>
				<div>
					<label for="year_of_departure" id="year_of_departure_label"><!-- --></label>
					<select id="year_of_departure">
						<option value="2007" selected="selected">2007</option>
						<option value="2008">2008</option>
						<option value="2009">2009</option>
						<option value="2010">2010</option>
					</select>
				</div>
			</fieldset>
			
			<fieldset>
				<legend id="accomodation_legend">Accomodation Information</legend>
				<div>
					<label for="type_of_room" id="type_of_room_label"><!-- --></label>
					<select id="type_of_room">
						<option value="single" selected="selected">single</option>
						<option value="double">double</option>
						<option value="apartment">apartment</option>
					</select>
				</div>
				<div>
					<label for="number_of_guests" id="number_of_guests_label"><!-- --></label>
					<input name="gosti" type="text" id="number_of_guests" size="3" maxlength="3" value="" onkeyup="hideWarning('number_of_guests_validator');"  class="text-align-right" />
					<div id="number_of_guests_validator" class="validator display-none"><!-- --></div>
				</div>
			</fieldset>
			
			<fieldset>
				<legend id="additional_info_legend"><!-- --></legend>
				<textarea id="additional_info"></textarea>
			</fieldset>
			
			<fieldset>
				<button type="submit" id="submit_button" title=""><!-- --></button>
				<button type="reset" id="reset_button" title=""><!-- --></button>
			</fieldset>
			<div class="display-none">
				<input type="hidden" id="date" />
				<input type="hidden" name="Subject" value="RESERVATION INFORMATION" />
				<input type="text" id="generatedantispamcode" name="generatedantispamcode"/>
				<input type="text" id="submittedantispamcode" name="submittedantispamcode"/>
				<textarea id="reservation_information" name="RESERVATION_INFORMATION"></textarea>
			</div>
		</div>
	</form>
	<!-- reservation form end -->
</body>
</html>

This post has been edited by kosin: 27 June 2009 - 02:21 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Proceed form data

#2 kmangold  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 11
  • View blog
  • Posts: 167
  • Joined: 24-June 09

Re: Proceed form data

Posted 26 June 2009 - 10:31 AM

Your validate() function is most likely returning false.
Was This Post Helpful? 0
  • +
  • -

#3 kosin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 23-December 08

Re: Proceed form data

Posted 26 June 2009 - 10:37 AM

/*
	Hotel Reservation  - Stylesheet File
	created by: Dejan Deki Kosin
	website: http://www.ptkpanonija.rs o
	email: d_kos_76@yahoo.com 
*/

div.reservation
{
	font: normal 12px "Trebuchet MS", Arial, Verdana;
	color: black;
}

div.reservation fieldset
{
	border: solid 1px #ccc;
	margin: 0;
	margin-bottom: 4px;
	padding: 6px;
}

div.reservation fieldset input,
div.reservation fieldset select,
div.reservation fieldset button,
div.reservation fieldset textarea
{
	vertical-align: middle;
	font: normal 13px "Trebuchet MS", Arial, Verdana;
	border: solid 1px black;
}

div.reservation fieldset.personal-data input
{
	width: 170px;
}

div.reservation fieldset textarea
{
	overflow: auto;
	width: 356px;
	height: 100px;
}

div.reservation legend
{
	background: infobackground;
	border: solid 1px #ccc;
	padding: 0 4px;
	margin-bottom: 4px;
	font-weight: bold;
}

div.reservation fieldset button
{
	margin: 4px;
	margin-left: 0;
}

div.reservation fieldset label
{
	display: block;
}

div.reservation fieldset div
{
	float: left;
	margin-right: 6px;
}

.display-none
{
	display: none;
}

.display-block
{
	display: block;
}

.validator
{
	background: url('Images/warning.gif') no-repeat;
	padding-left: 20px;
	color: red;
}

.text-align-right
{
	text-align: right;
}

.break
{
	clear: both;
}


ReservatioForm.js
/*
	Hotel Reservation 
	created by: Dejan Deki Kosin
	website: http://www.ptkpanonija.rs
	email: d_kos_76@yahoo.com 
*/

window.onload = function()
{
	localize();
	var randomnumber = Math.floor(Math.random()*10000);
	var date = new Date();
	var custom_month = new Date();
	var month = new Date();
	custom_month[0] = "January";
	custom_month[1] = "February";
	custom_month[2] = "March";
	custom_month[3] = "April";
	custom_month[4] = "May";
	custom_month[5] = "June";
	custom_month[6] = "July";
	custom_month[7] = "August";
	custom_month[8] = "September";
	custom_month[9] = "October";
	custom_month[10] = "November";
	document.getElementById('date').value = date.getDate() + '/' + custom_month[month.getMonth()] + '/' + date.getFullYear();
	document.getElementById('generatedantispamcode').value = randomnumber;
}

function validate()
{
	if(document.getElementById('first_name').value == '')
	{
		document.getElementById('first_name').focus();
		document.getElementById('name_validator').className = 'validator display-block';
		document.getElementById('name_validator').innerHTML = xmlDoc.getElementsByTagName("mandatoryfield")[0].childNodes[0].nodeValue;
		return false;
	}
	if(document.getElementById('surname').value == '')
	{
		document.getElementById('surname').focus();
		document.getElementById('surname_validator').className = 'validator display-block';
		document.getElementById('surname_validator').innerHTML = xmlDoc.getElementsByTagName("mandatoryfield")[0].childNodes[0].nodeValue;
		return false;
	}
	if(document.getElementById('email').value == '')
	{
		document.getElementById('email').focus();
		document.getElementById('email_validator').className = 'validator display-block';
		document.getElementById('email_validator').innerHTML = xmlDoc.getElementsByTagName("mandatoryfield")[0].childNodes[0].nodeValue;
		return false;
	}
	if(document.getElementById('email').value.indexOf('@') < 0 || document.getElementById('email').value.indexOf('.') < 0 || document.getElementById('email').value.indexOf('@.') > 1 || document.getElementById('email').value.indexOf('.@.') > 1  || document.getElementById('email').value.indexOf('.@') > 1)
	{
		document.getElementById('email').select();
		document.getElementById('email_validator').className = 'validator display-block';
		document.getElementById('email_validator').innerHTML = xmlDoc.getElementsByTagName("invalidemail")[0].childNodes[0].nodeValue;
		return false;
	}
	if(document.getElementById('phone').value == '')
	{
		document.getElementById('phone').focus();
		document.getElementById('phone_validator').className = 'validator display-block';
		document.getElementById('phone_validator').innerHTML = xmlDoc.getElementsByTagName("mandatoryfield")[0].childNodes[0].nodeValue;
		return false;
	}
	if(isNaN(document.getElementById('phone').value))
	{
		document.getElementById('phone').select();
		document.getElementById('phone_validator').className = 'validator display-block';
		document.getElementById('phone_validator').innerHTML = xmlDoc.getElementsByTagName("invalidphone")[0].childNodes[0].nodeValue;
		return false;
	}
	if(document.getElementById('number_of_guests').value == '')
	{
		document.getElementById('number_of_guests').focus();
		document.getElementById('number_of_guests_validator').className = 'validator display-block';
		document.getElementById('number_of_guests_validator').innerHTML = xmlDoc.getElementsByTagName("mandatoryfield")[0].childNodes[0].nodeValue;
		return false;
	}
	if(isNaN(document.getElementById('number_of_guests').value))
	{
		document.getElementById('number_of_guests').select();
		document.getElementById('number_of_guests_validator').className = 'validator display-block';
		document.getElementById('number_of_guests_validator').innerHTML = xmlDoc.getElementsByTagName("invalidnumberofguests")[0].childNodes[0].nodeValue;
		return false;
	}
	else
	{
		document.getElementById('reservation_information').value = '\n\ndate submitted: ' + document.getElementById('date').value + '\nname: ' + document.getElementById('first_name').value + ' ' + document.getElementById('surname').value + '\nemail: ' + document.getElementById('email').value + '\nphone number: ' + document.getElementById('phone').value + '\narrival: ' + document.getElementById('day_of_arrival').value + '/' + document.getElementById('month_of_arrival').value + '/' + document.getElementById('year_of_arrival').value + '\ndeparture: ' + document.getElementById('day_of_departure').value + '/' + document.getElementById('month_of_departure').value + '/' + document.getElementById('year_of_departure').value + '\ntype of room: ' + document.getElementById('type_of_room').value + '\nnumber of guests: ' + document.getElementById('number_of_guests').value + '\nadditional information: ' + document.getElementById('additional_info').value;
		document.getElementById('submittedantispamcode').value = document.getElementById('generatedantispamcode').value;
	}
 }

function hideWarning(ValidatorId)
{
	document.getElementById(ValidatorId).className = 'validator display-none';
}

function resetForm()
{
	hideWarning('name_validator');
	hideWarning('surname_validator');
	hideWarning('email_validator');
	hideWarning('phone_validator');
	hideWarning('number_of_guests_validator');
}

function localize()
{
	var localizationfiles = 'ReservationForm/Localization/' + formlanguage + '.xml';
	if(window.ActiveXObject)
	{
		xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
		xmlDoc.async = false;
		xmlDoc.load(localizationfiles);
		readLocalizationFile();
	}
	else if(document.implementation && document.implementation.createDocument)
	{
		xmlDoc = document.implementation.createDocument("","",null);
		xmlDoc.load(localizationfiles);
		xmlDoc.onload = readLocalizationFile;
	}
}

function readLocalizationFile()
{
	document.getElementById('personal_info_legend').innerHTML = xmlDoc.getElementsByTagName("personalinfo")[0].childNodes[0].nodeValue;
	document.getElementById('first_name_label').innerHTML = xmlDoc.getElementsByTagName("firstname")[0].childNodes[0].nodeValue;
	document.getElementById('surname_label').innerHTML = xmlDoc.getElementsByTagName("surname")[0].childNodes[0].nodeValue;
	document.getElementById('email_label').innerHTML = xmlDoc.getElementsByTagName("email")[0].childNodes[0].nodeValue;
	document.getElementById('phone_label').innerHTML = xmlDoc.getElementsByTagName("phonenumber")[0].childNodes[0].nodeValue;
	
	document.getElementById('arrival_legend').innerHTML = xmlDoc.getElementsByTagName("arrival")[0].childNodes[0].nodeValue;
	document.getElementById('day_of_arrival_label').innerHTML = xmlDoc.getElementsByTagName("day")[0].childNodes[0].nodeValue;
	document.getElementById('month_of_arrival_label').innerHTML = xmlDoc.getElementsByTagName("month")[0].childNodes[0].nodeValue;
	document.getElementById('year_of_arrival_label').innerHTML = xmlDoc.getElementsByTagName("year")[0].childNodes[0].nodeValue;
	
	document.getElementById('departure_legend').innerHTML = xmlDoc.getElementsByTagName("departure")[0].childNodes[0].nodeValue;
	document.getElementById('day_of_departure_label').innerHTML = xmlDoc.getElementsByTagName("day")[0].childNodes[0].nodeValue;
	document.getElementById('month_of_departure_label').innerHTML = xmlDoc.getElementsByTagName("month")[0].childNodes[0].nodeValue;
	document.getElementById('year_of_departure_label').innerHTML = xmlDoc.getElementsByTagName("year")[0].childNodes[0].nodeValue;
	
	document.getElementById('accomodation_legend').innerHTML = xmlDoc.getElementsByTagName("accomodation")[0].childNodes[0].nodeValue;
	document.getElementById('type_of_room_label').innerHTML = xmlDoc.getElementsByTagName("typeofroom")[0].childNodes[0].nodeValue;
	document.getElementById('number_of_guests_label').innerHTML = xmlDoc.getElementsByTagName("numberofguests")[0].childNodes[0].nodeValue;
	
	document.getElementById('additional_info_legend').innerHTML = xmlDoc.getElementsByTagName("additionalinfo")[0].childNodes[0].nodeValue;
	
	document.getElementById('submit_button').innerHTML = xmlDoc.getElementsByTagName("submitbutton")[0].childNodes[0].nodeValue;
	document.getElementById('reset_button').innerHTML = xmlDoc.getElementsByTagName("resetbutton")[0].childNodes[0].nodeValue;
	
	document.getElementById('submit_button').title = xmlDoc.getElementsByTagName("submitbutton")[0].childNodes[0].nodeValue;
	document.getElementById('reset_button').title = xmlDoc.getElementsByTagName("resetbutton")[0].childNodes[0].nodeValue;
}


View Postkmangold, on 26 Jun, 2009 - 09:31 AM, said:

Your validate() function is most likely returning false.
Here is ReservationForm.js, so can anyone see what's wrong?
Was This Post Helpful? 0
  • +
  • -

#4 kosin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 23-December 08

Re: Proceed form data

Posted 26 June 2009 - 10:58 AM

ReservationForm.php
<?php
$name = $_POST['first_name'];
$surname = $_POST['surname'];
$email = $_POST['email'];
echo "This is $name, $surname and $email";
?>

Was This Post Helpful? 0
  • +
  • -

#5 hadi_php  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 10
  • View blog
  • Posts: 382
  • Joined: 23-August 08

Re: Proceed form data

Posted 26 June 2009 - 11:20 AM

<form id="ReservationForm" action="http://www.ptkpanonija.rs/rezer/ReservationForm/ReservationForm.php" method="post" onsubmit="return validate();" onreset="resetForm();">


try this

<form action="ReservationForm.php" method="post">


then...

ReservationForm.php

<?php
$name = $_POST['first_name'];
$surname = $_POST['surname'];
$email = $_POST['email'];
//echo "This is $name, $surname and $email"; <------dont use this------>

echo "This is ";
echo $name;
echo $surname;
echo " And ";
echo $email;
?>

This post has been edited by hadi_php: 26 June 2009 - 11:23 AM

Was This Post Helpful? 0
  • +
  • -

#6 RPGonzo  Icon User is offline

  • // Note to self: hmphh .... I forgot
  • member icon

Reputation: 151
  • View blog
  • Posts: 954
  • Joined: 16-March 09

Re: Proceed form data

Posted 26 June 2009 - 11:41 AM

echo "This is $name, $surname and $email";



this is alot simpler way to do this

echo "This is ";
echo $name;
echo $surname;
echo " And ";
echo $email;



Same thing just in one line ....


hadi you bypassed his whole validation script which i think he is going to want ...

<form id="ReservationForm" action="ReservationForm.php" method="post" onsubmit="return validate();">



Your issue like someone said is probably in your JS ... easiest way , for me that is, is to just use Firebug in Firefox it has a script tool which you can set to break on error .... if your JS is doing it it should show you where its dieing at ... if you have the URL of the form i would be more than happy to look at a live version of ...

This post has been edited by RPGonzo: 26 June 2009 - 11:43 AM

Was This Post Helpful? 0
  • +
  • -

#7 kosin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 23-December 08

Re: Proceed form data

Posted 26 June 2009 - 11:49 AM

I'll try what you said and will tell you tomorrow. Thank you!
Was This Post Helpful? 0
  • +
  • -

#8 hadi_php  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 10
  • View blog
  • Posts: 382
  • Joined: 23-August 08

Re: Proceed form data

Posted 26 June 2009 - 11:57 AM

@RPGonzo i guess for that reason nothing displayed....

So i want to try him to use that first then add onsubmit="return validate();
Was This Post Helpful? 0
  • +
  • -

#9 RPGonzo  Icon User is offline

  • // Note to self: hmphh .... I forgot
  • member icon

Reputation: 151
  • View blog
  • Posts: 954
  • Joined: 16-March 09

Re: Proceed form data

Posted 26 June 2009 - 12:02 PM

If the HTML form submitted though we would try that ... but because something is keeping it from submitting period it has to do with the validation :P

Quote

But when I click submit button, nothing happened. Why?


At least from that line that's what im guessing anyways lol

This post has been edited by RPGonzo: 26 June 2009 - 12:03 PM

Was This Post Helpful? 0
  • +
  • -

#10 hadi_php  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 10
  • View blog
  • Posts: 382
  • Joined: 23-August 08

Re: Proceed form data

Posted 26 June 2009 - 12:16 PM

ok...ok... dude....sorry... :stupid: .I m also in begainner position. :D .so donnt catch all things easily....May be one day i will .. :sad3: .. i faced that type of problem...so i forced him to do like i said coz that way i fix my problem........actually most of time i even donnt know how i fix that.......lolz. :lol: .......i need to go more far..... :dead:
Was This Post Helpful? 0
  • +
  • -

#11 RPGonzo  Icon User is offline

  • // Note to self: hmphh .... I forgot
  • member icon

Reputation: 151
  • View blog
  • Posts: 954
  • Joined: 16-March 09

Re: Proceed form data

Posted 26 June 2009 - 12:32 PM

lol don't beat yourself up .. attempting is better than giving up ... im not by any means "good" at this stuff ... i just have played with it enough to have experienced problems and know a "generalized" path of figuring it out :P :blink: sometimes
Was This Post Helpful? 0
  • +
  • -

#12 kosin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 23-December 08

Re: Proceed form data

Posted 27 June 2009 - 01:53 AM

---------------------------------
When I do
$name = ($_POST['first_name']);
$surname = ($_POST['surname']);
$email = ($_POST['email']);
$phone = ($_POST['phone']);
$guests = ($_POST['gosti']);
echo "This is $name, $surname,$email and telephoen $phone with number of guests  $guests";
But it shows correctly only $name, $surname and $email. $phone and $guests aren't. It shows nothing! Why?
Was This Post Helpful? 0
  • +
  • -

#13 noorahmad  Icon User is offline

  • Untitled
  • member icon

Reputation: 209
  • View blog
  • Posts: 2,290
  • Joined: 12-March 09

Re: Proceed form data

Posted 27 June 2009 - 02:23 AM

Quote

But it shows correctly only $name, $surname and $email. $phone and $guests aren't. It shows nothing! Why?


your are using echo to show your variables.

Quote

echo "This is $name, $surname,$email and telephoen $phone with number of guests $guests";

Was This Post Helpful? 0
  • +
  • -

#14 kosin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 23-December 08

Re: Proceed form data

Posted 27 June 2009 - 02:37 AM

Yes. It shows correctly in echo $name, $surname and $email. Others, $phone and $guests aren't. I do all before inserting data in database to check everything.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1