how to handle multipe textbox using PHP
Posted: Thu Jun 02, 2005 1:09 am
Dear all,
I'm facing a problem to handle multiple textbox. I'm using two textbox with the same name. And a button, onclick that button it will take to a php page where i can retrive values given in the textbox in first page. I just want to pass all the data given in the buttonchk.htm to the next page buttonrcv.php by using array. I tried with the name="remark[]" but it says error in page. Please help me out!
buttonchk.htm:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body>
<input name="remarks" type="text" size="20" maxlength="200">
<input name="remarks" type="text" size="20" maxlength="200">
<button style="background:#FFFFFF;width:50" onClick="window.location.href='buttonrcv.php?remarks='+remarks.value">Done</button>
</body></html>
buttonrcv.php:
<html><head><title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body>
<?php
$remark[] = $_GET["remarks"];
echo $remark[0];
echo $remark[1];
?>
</body></html>
Reagrds
poor Sahrear
I'm facing a problem to handle multiple textbox. I'm using two textbox with the same name. And a button, onclick that button it will take to a php page where i can retrive values given in the textbox in first page. I just want to pass all the data given in the buttonchk.htm to the next page buttonrcv.php by using array. I tried with the name="remark[]" but it says error in page. Please help me out!
buttonchk.htm:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body>
<input name="remarks" type="text" size="20" maxlength="200">
<input name="remarks" type="text" size="20" maxlength="200">
<button style="background:#FFFFFF;width:50" onClick="window.location.href='buttonrcv.php?remarks='+remarks.value">Done</button>
</body></html>
buttonrcv.php:
<html><head><title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body>
<?php
$remark[] = $_GET["remarks"];
echo $remark[0];
echo $remark[1];
?>
</body></html>
Reagrds
poor Sahrear