|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Help! Exam looming PHP parse problem Help!
I have to submit a piece of work for an exam next week and have parse errors appearing (highlighted in red) in this peice of code...can anyone help please?...
<? while ($row = mysql_fetch_array($query_result_handle)){ echo "<h2>".$row["start_date"]." - ".$row["end_date"]."</h2><br>"; echo $row["villa_name"]." costs ". $row["price"]." pounds per week and is: ".$row["availability"]."<br>"; if ($row["availability"] == "Available"){ echo "<br><br><b>Reserve it now!</b> echo "<form name=\"form1\" method=\"post\" action=\"reserve_villa.php\">\n"; echo "Forename <input type=\"text\" name=\"forename\"><br>\n"; echo "Surname <input type=\"text\" name=\"surname\"><br>\n"; echo "Email <input type=\"text\" name=\"email\"><Br><br>\n"; echo "<textarea name=\"order_information\" rows=5 cols=40 >".$row["start_date"]." - ".$row["end_date"]." \n ".$row["villa_name"]." \n ". $row["price"]." p/w</textarea><br><br>\n"; echo "<input type=\"submit\" name=\"submit\" value=\"SUBMIT\">\n"; echo "</form>\n"; }else{ echo "<br><br>Sorry this villa is unavailable, to choose another date <a href=\"rates_and_dates_spain.htm\">click here</a> } } ?> |
|
#2
|
|||
|
|||
|
have you tried simply deleting the line, and then saving the file to the server, then loading the page, then retrieve the page from the server again, then rewrite the line ?
sometimes, odd "invissible" lines ocur - Pheifel |
|
#3
|
|||
|
|||
|
okay let me see
if ($row["availability"] == "Available"){ echo "<br><br><b>Reserve it now!</b> echo "<form name=\"form1\" method=\"post\" action=\"reserve_villa.php\">\n"; hrmm the middle line with reserve it now? it might work if you would add the quote and semi-colon at the end echo "<br><br><b>Reserve it now!</b>"; |
|
#4
|
||||
|
||||
|
There was no need to post this in the Scripting forum as well.
|
|
#5
|
|||
|
|||
|
Thanks for the suggestion ...it didn't seem to help.
|
|
#6
|
|||
|
|||
|
you also need to close this line :
echo "<br><br>Sorry this villa is unavailable, to choose another date <a href=\"rates_and_dates_spain.htm\">click here</a> PHP Code:
is how it should be. Also you dont need to echo html bits out. Just use html then re open the php tag. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Help! Exam looming PHP parse problem Help! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|