Hi, I wrote a php project 2 years ago. I am totally lost right now.
what is differnt between $userName, $_GET['userName'] and
$_REQUEST['userName']? In my past project, I remember i can use
$userName as a variable, but i dont know why I cannot use it again
because of using different version of php and apache? What is
different between "printf", "print" and "echo"? Can you guys help me
fix my a little project too? Thanks
Two files
testing1.php
<?php
require ('testing.php') ;
if(!$_REQUEST['submit1'])
{
MainFrame();
}
else if ($submit1 == "Receiving" )
{
print $_REQUEST['username'];
}
else
print $_REQUEST['sumbit1'];
?>
testing.php
<?php
function MainFrame()
{
print ("<form action = "testing1.p hp" method="POST">
<input type ="text" name="username" ><br>
<input type ="submit" name="submit1" value="Receivin g">
<input type ="submit" name="submit1" value="Invenory ">
<input type ="submit" name="submit1" value="Assembly ">
<input type ="submit" name="submit1" value="Tracking ">
<input type ="submit" name="submit1" value="Reports" >
<input type ="submit" name="submit1" value="Setup">
</form>
")
?>
I get these errors:
Parse error: parse error, unexpected T_STRING in c:\program
files\easyphp1-7\www\testing.p hp on line 5
Notice: Undefined index: submit1 in c:\program
files\easyphp1-7\www\testing1. php on line 6
Fatal error: Call to undefined function: mainframe() in c:\program
files\easyphp1-7\www\testing1. php on line 9
Thanks,
Krista
what is differnt between $userName, $_GET['userName'] and
$_REQUEST['userName']? In my past project, I remember i can use
$userName as a variable, but i dont know why I cannot use it again
because of using different version of php and apache? What is
different between "printf", "print" and "echo"? Can you guys help me
fix my a little project too? Thanks
Two files
testing1.php
<?php
require ('testing.php') ;
if(!$_REQUEST['submit1'])
{
MainFrame();
}
else if ($submit1 == "Receiving" )
{
print $_REQUEST['username'];
}
else
print $_REQUEST['sumbit1'];
?>
testing.php
<?php
function MainFrame()
{
print ("<form action = "testing1.p hp" method="POST">
<input type ="text" name="username" ><br>
<input type ="submit" name="submit1" value="Receivin g">
<input type ="submit" name="submit1" value="Invenory ">
<input type ="submit" name="submit1" value="Assembly ">
<input type ="submit" name="submit1" value="Tracking ">
<input type ="submit" name="submit1" value="Reports" >
<input type ="submit" name="submit1" value="Setup">
</form>
")
?>
I get these errors:
Parse error: parse error, unexpected T_STRING in c:\program
files\easyphp1-7\www\testing.p hp on line 5
Notice: Undefined index: submit1 in c:\program
files\easyphp1-7\www\testing1. php on line 6
Fatal error: Call to undefined function: mainframe() in c:\program
files\easyphp1-7\www\testing1. php on line 9
Thanks,
Krista
Comment