SunQuest
 
           PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old May 22nd, 2004, 09:56 AM
Chris B Chris B is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 2 Chris B User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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>
}
}
?>

Reply With Quote
  #2  
Old May 22nd, 2004, 11:29 AM
Pheifel Pheifel is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: Denmark
Posts: 174 Pheifel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 46 sec
Reputation Power: 5
Send a message via MSN to Pheifel
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

Reply With Quote
  #3  
Old May 22nd, 2004, 10:58 PM
gallifray gallifray is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Pennsylvania
Posts: 16 gallifray User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 3 sec
Reputation Power: 0
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>";

Reply With Quote
  #4  
Old May 23rd, 2004, 12:52 AM
edwinbrains's Avatar
edwinbrains edwinbrains is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Location: UK
Posts: 160 edwinbrains User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 5 m 50 sec
Reputation Power: 5
There was no need to post this in the Scripting forum as well.

Reply With Quote
  #5  
Old May 23rd, 2004, 09:02 AM
Chris B Chris B is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 2 Chris B User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for the suggestion ...it didn't seem to help.

Reply With Quote
  #6  
Old May 23rd, 2004, 10:00 AM
q3utom q3utom is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 16 q3utom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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:
echo "<br><br>Sorry this villa is unavailable, to choose another date <a href=\"rates_and_dates_spain.htm\">click here</a>"


is how it should be.
Also you dont need to echo html bits out. Just use html then re open the php tag.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Help! Exam looming PHP parse problem Help!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway