LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Please help me Parse error: parse error on line 39 (http://www.linuxquestions.org/questions/programming-9/please-help-me-parse-error-parse-error-on-line-39-a-862977/)

rakesh1979 02-16-2011 12:03 AM

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>

John VV 02-16-2011 12:28 AM

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

j-ray 02-16-2011 03:50 AM

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

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

That's my first impress...


All times are GMT -5. The time now is 12:17 PM.