LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-16-2011, 01:03 AM   #1
rakesh1979
LQ Newbie
 
Registered: Feb 2011
Posts: 2

Rep: Reputation: 0
Please help me Parse error: parse error on line 39


<html><head><title>Hidden Fields</title></head>
<body bgcolor="#ff66ff">
<font face="Verdana, Arial, Helvetica, sans-serif">
<div align="center">
<b>
<?php
if (isset($_POST['feedback1']) && ($_POST['feedback1'] =='process_form1')){
process_form1();
}
else{
display_form1();
}
function display_form1(){
echo <<<EOF
<form action="$_SERVER[PHP_SELF]" method="post">
Rate this page
<br /><b /r>
<input type="radio" name="rating" value="excellent"/>Really kewl
<input type="radio" name="rating" value="average" />OK
<input type="radio" name="rating" value="poor" />Boring
<input type="radio" name="rating" value="hopeless"/>Totally hopeless

<input type="hidden" name="feedback1" value="process_form1">
<input type="hidden" name="creation_date" value="Feb.2006" />
<p>
<input type="submit" value="submit rating" />
<input type="reset" value="clear" />
</form>
EOF;
}
function process_form1(){
echo "So you think this page is $_POST[rating]!";
}
?>
</b>
</div>
</font>
</body>
</html>
 
Old 02-16-2011, 01:28 AM   #2
John VV
Guru
 
Registered: Aug 2005
Posts: 13,226

Rep: Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774Reputation: 1774
???
so what is it you are trying to do ???
what program said " parse error on line 39

and what line above is line 39
also can you PLEASE use the BB <code></code> tags replace <> with []

Code:
...
<input type="radio" name="rating" value="excellent"/>Really kewl
<input type="radio" name="rating" value="average" />OK
<input type="radio" name="rating" value="poor" />Boring
<input type="radio" name="rating" value="hopeless"/>Totally hopeless
...
but the php open/close tags in your post look a bit "off"
 
Old 02-16-2011, 04:50 AM   #3
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,438

Rep: Reputation: 103Reputation: 103
echo "So you think this page is $_POST[rating]!";

echo "So you think this page is ".$_POST["rating"]."!";

That's my first impress...
 
  


Reply

Tags
php


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse error: syntax error (install_admin_menu.php line 2) mike24078 Programming 10 04-08-2010 09:34 AM
PHP Error Parse error: parse error, unexpected $ in /home/content/S/k/i/SkinCare4U/h CowanServices Programming 2 12-09-2008 09:26 PM
Parse error: parse error, unexpected '}' in /home/content jouvert Linux - Newbie 3 05-17-2008 07:55 PM
Parse error: parse error, unexpected $ in /home/content/d/o/m/domain/html/addpuppy2.p Scooby-Doo Programming 3 10-25-2007 10:41 AM


All times are GMT -5. The time now is 10:55 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration