Hi there. Working on my 3rd script and I don't know how I got even that far lol, and came accross this issue:
I am using a form to input a user's classified ad. I would like them to be able to add new text boxes (one at a time)if they chose. However, when I press the "add line" button I made, it only works the 1st time. How can I make the function "remember" it's output and add new boxes indefinatley(without cookies)?
CODE:
PHP:
if( $HTTP_POST_VARS['newline'] ) {
static $rownum = 3; /*thought this might do it, but it didn't. I need to start at 3 b/c the first 3 boxes are on the web page already.*/
$rownum++;/*increment the row numer*/
print "<b>Row ".$rownum." </b>(30 Characters Max.)<b>:</b><br /><INPUT TYPE=\"text\" SIZE=\"32\" maxlength=\"30\" NAME=\"row".$rownum."\">(+¥50)<br />";
}
HTML:
<INPUT TYPE="submit" NAME="newline" VALUE="Add a Line">
I think the issue lies with the way this is set up. I am submitting the button, therefore I am kinda reloading the script, right? But I don't know what else to try that isn't cookie or database dependant.