matt1776
07-12-2006, 04:10 PM
im trying to make these values 'sticky' so that when the user submits, if he/she is missing something, they dont have to fill out feilds already typed in, this is what im used to using:
<table border="0" cellspacing="5">
<form method="post" action="<?php $_SERVER[PHP_SELF]?>">
<input type="hidden" name="action" value="activate">
<tr><td>First Name</td><td><input type="text" name="fname" value="<?=$fname?>"></td></tr>
<tr><td>Last Name</td><td><input type="text" name="lname" value="<?=$lname?>"></td></tr>
So that when the values post to the server, the page refreshes and the values for those feilds have the values in them already. However the server im using has php 5 installed. SO i tried this instead:
<table border="0" cellspacing="5">
<form method="post" action="<?php $_SERVER[PHP_SELF]?>">
<input type="hidden" name="action" value="activate">
<tr><td>First Name</td><td><input type="text" name="fname" value="<?php $_POST['fname']?>"></td></tr>
<tr><td>Last Name</td><td><input type="text" name="lname" value="<?php $_POST['lname']?>"></td></tr>
And still no luck. What am I doing wrong? I thought I had this down.
<table border="0" cellspacing="5">
<form method="post" action="<?php $_SERVER[PHP_SELF]?>">
<input type="hidden" name="action" value="activate">
<tr><td>First Name</td><td><input type="text" name="fname" value="<?=$fname?>"></td></tr>
<tr><td>Last Name</td><td><input type="text" name="lname" value="<?=$lname?>"></td></tr>
So that when the values post to the server, the page refreshes and the values for those feilds have the values in them already. However the server im using has php 5 installed. SO i tried this instead:
<table border="0" cellspacing="5">
<form method="post" action="<?php $_SERVER[PHP_SELF]?>">
<input type="hidden" name="action" value="activate">
<tr><td>First Name</td><td><input type="text" name="fname" value="<?php $_POST['fname']?>"></td></tr>
<tr><td>Last Name</td><td><input type="text" name="lname" value="<?php $_POST['lname']?>"></td></tr>
And still no luck. What am I doing wrong? I thought I had this down.