PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
I am trying to make a form to go on my website to gather info. But I keep getting this parse error See below for php info and error msg...
Parse error: parse error, unexpected '(' in /home/buyadblo/public_html/display_input.php on line 2
Parse error: parse error, unexpected '(' in /home/buyadblo/public_html/display_input.php on line 2
<?
if ($_POST['func'] == "" && $_POST['text1'] == "")
{
//I"m assuming you wanted both text1 and func to be empty
//Unless func is defined use the ' around the array names
header ("Location: http://somesite/generic_form.html" );
//I like to use full addresses here.
exit();
//This is good. Some people for get to exit.
}
$result = $_POST['func'] .$_POST['text1'];
// The dot concatenates the variables together
?>
<HTML>
<HEAD>
<TITLE>Generic Input Results</TITLE>
</HEAD>
<BODY>
<? echo "$result"; ?>
<P><a href="generic_form.html">Go Again!</a></p>
</BODY>
</HTML>
Parse error: parse error, unexpected '(' in /home/buyadblo/public_html/display_input.php on line 2
<?
if ($_POST['func'] == "" && $_POST['text1'] == "")
{
//I"m assuming you wanted both text1 and func to be empty
//Unless func is defined use the ' around the array names
header ("Location: http://somesite/generic_form.html" );
//I like to use full addresses here.
exit();
//This is good. Some people for get to exit.
}
$result = $_POST['func'] .$_POST['text1'];
// The dot concatenates the variables together
?>
<HTML>
<HEAD>
<TITLE>Generic Input Results</TITLE>
</HEAD>
<BODY>
<? echo "$result"; ?>
<P><a href="generic_form.html">Go Again!</a></p>
</BODY>
</HTML>