Learning PHP

I am a beginner and I need:
A sample code with a textbox and submit button - I figured out how to get thiis.
After clicking on submit, it should ech text entered in the above text box on the same page - Please help me in doing this.

Sounds like answer to a homework :wink:

ha ha :slight_smile:
In fact I have never used PHP and working hard on a project. Let me explain the entire thing what I am looking at.

Here is a function:
$total =0;
mysql_connect (“localhost”, “wysiwyg”, “password”) or die ('Error: ’

mysql_select_db (“network”);

function getTotalLeg($memid,$leg){
$sql=“select member_id from members where parent_id='”.$memid."’ and

$res=mysql_query($sql) or exit( mysql_error() );
global $total;
getTotalLeg ($row[‘member_id’],‘l’);
getTotalLeg ($row[‘member_id’],‘r’);
return $total;
Here is the function call
echo "left = ";
echo getTotalLeg(“mlm10006”,“l”);
echo “<br/>”;
$total =0;
echo "right = ";
echo getTotalLeg(“mlm10006”,“r”);

The current echo statments prints value of r and l. Instead of echoing what I need, I need to have a textbox which will have mlm1006 as the userinput on clicking on submit button, it should return a value Left = xx and Right = xx