PDA

View Full Version : _POST or _GET after inserting data


Paws
05-10-2007, 08:15 AM
I have a registration form and after submitting the values using "POST" as the form action:

I am unable to see the data on the next page that is calling the posted values using:
$username = $_POST['username'];
Now this should work!
I am not sure what is happening???:confused:
Any ideas why the data is not being posted?

I have tried this script and you know what the answer is:
<?php
$username = '';
if (!empty($_GET['username'])) $username = $_GET['username'];
if (!empty($_POST['username'])) $username = $_POST ['username'];
if (empty($username)) die('No username has been selected!');
//echo "No username has been selected!"
?> :confused:

davidj
05-10-2007, 10:29 AM
post the whole script including the detail page

Paws
05-10-2007, 10:41 AM
Will do, but the detail page is not complete as I am not sure which way to go yet.

Basically it's:
Registration then activate from the secret key received via mail.:confused:

Not sure if the user should just be activated automatically then it solves this issue but would like to verify the email address.:mrgreen:

Will post it now...

Paws
05-10-2007, 10:43 AM
Register page in PHP.


Unable to post entire page.
So here is the FORM tags:

<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
<table width="100%" cellspacing="0" class="tableborder">
<tr valign="baseline" class="normaltext">
<td colspan="2" valign="top" nowrap bgcolor="#E8E8E8"><div align="left" class="p3"><strong>Please enter your username, password and email:</strong></div></td>
</tr>
<tr class="normaltext">
<td valign="top" nowrap class="p3"><div align="left">*Username: (6 or more characters) <br />
<input name="username" type="text" id="username" value="<?php echo $_POST['username']; ?>" size="25"/>
</div></td>
<td valign="top" nowrap="nowrap" class="p3"><div align="left">*Confirm Username: <br />
<input name="usernamec" type="text" id="usernamec" value="" size="25" />
</div></td>
</tr>
<tr class="p3">
<td valign="top" nowrap class="p3"><div align="left"> *Password:<br />
<input name="password" type="password" id="password" value="<?php echo $_POST['password']; ?>" size="25" />
</div></td>
<td valign="top" class="p3"><div align="left"> *Confirm Password:<br />
<input name="passwordc" type="password" id="passwordc" value="" size="25" />
</div></td>
</tr>
<tr class="normaltext">
<td valign="top" nowrap class="p3"><div align="left">*Email: (valid email)<br />
<input name="email" type="text" id="email" value="<?php echo $_POST['email']; ?>" size="25" />
</div></td>
<td valign="top" class="p3"><div align="left"> *Confirm Email:<br />
<input name="emailc" type="text" id="emailc" value="" size="25" />
</div></td>
</tr>
<tr valign="top" class="normaltext">
<td colspan="2" valign="top" nowrap bgcolor="#E8E8E8"><div align="left" class="p3"><strong>Personal infromation:</strong></div></td>
</tr>
<tr valign="baseline" class="normaltext">
<td valign="top" nowrap class="p3"><div align="left"> *FirstName:<br />
<input type="text" name="StuName" value="<?php echo $_POST['StuName']; ?>" size="25" />
</div></td>
<td valign="top" class="p3"><div align="left"> *Lastname:<br />
<input type="text" name="StuSurname" value="<?php echo $_POST['StuSurname']; ?>" size="25" />
</div></td>
</tr>
<tr valign="top" class="normaltext">
<td valign="top" nowrap class="p3"><div align="left"> *Telephone:(0213334444)<br />
<input name="StuTelephone" type="text" onKeyUp="javascript:checkNumber(form1.StuTelephone);" value="<?php echo $_POST['StuTelephone']; ?>" size="25" maxlength="10"/>
</div></td>
<td valign="top" nowrap="nowrap" class="p3"><div align="left"> *Cellphone:( 0834445555)<br />
<input name="StuCellphone" type="text" onKeyUp="javascript:checkNumber(form1.StuCellphone);" value="<?php echo $_POST['StuCellphone']; ?>" size="25" maxlength="10"/>
</div></td>
</tr>
<tr valign="baseline" class="normaltext">
<td colspan="2" valign="top" nowrap bgcolor="#E8E8E8"><div align="left" class="p3"><strong>Best Contact Times:</strong></div></td>
</tr>
<tr valign="baseline" class="normaltext">
<td colspan="2" valign="top" nowrap class="p3"><div align="left">Between
<select name="time1" id="time1"
onchange="updateTimes();document.form1.StuContact_times.valu e='Between ' + document.form1.time1.value + ' and '+ document.form1.time2.value">
<?php
do {
?>
<option value="<?php echo $row_rstimes['timeformat']?>"><?php echo $row_rstimes['timeformat']?></option>
<?php
} while ($row_rstimes = mysql_fetch_assoc($rstimes));
$rows = mysql_num_rows($rstimes);
if($rows > 0) {
mysql_data_seek($rstimes, 0);
$row_rstimes = mysql_fetch_assoc($rstimes);
}
?>
</select>
and
<select name="time2" id="time2" onChange="document.form1.StuContact_times.value= 'Between ' + document.form1.time1.value + ' and '+ document.form1.time2.value">
<option value="">(Select One)</option>
<?php
do {
?>
<option value="<?php echo $row_rstimes['timeformat']?>"><?php echo $row_rstimes['timeformat']?></option>
<?php
} while ($row_rstimes = mysql_fetch_assoc($rstimes));
$rows = mysql_num_rows($rstimes);
if($rows > 0) {
mysql_data_seek($rstimes, 0);
$row_rstimes = mysql_fetch_assoc($rstimes);
}
?>
</select>
<input type="hidden" name="StuContact_times" value="" size="25" /></div></td>
</tr>
<tr valign="baseline" class="normaltext">
<td colspan="2" valign="top" class="p3">
<div align="left">
<input name="chkMonday" type="checkbox" id="chkMonday" value="Monday" />Monday
<input name="chkTuesday" type="checkbox" id="chkTuesday" value="Tuesday" />Tuesday
<input name="chkWednesday" type="checkbox" id="chkWednesday" value="Wednseday" />Wednesday
<input name="chkThursday" type="checkbox" id="chkThursday" value="Thursday" />Thursday
<input name="chkFriday" type="checkbox" id="chkFriday" value="Friday" />Friday
<br><input name="chkSaturday" type="checkbox" id="chkSaturday" value="Saturday" />Saturday
<input name="chkSunday" type="checkbox" id="chkSunday" value="Sunday" />Sunday</div>
</td>
</tr>
<tr ="baseline" class="normaltext">
<td colspan="2" valign="top" nowrap bgcolor="#E8E8E8" ><div align="left" class="p3"><strong>Where can you be reached:</strong></div></td>
</tr>
<tr valign="baseline" class="normaltext">
<td valign="top" nowrap class="p3"><p>*Province:<br>
<select name="Province" id="Province" onChange="TCN_reload(this)" style="width:200px">
<option>Select a Province =&gt;</option>
</select>
</td>
<td valign="top" class="p3">
*City:<br>
<select name="City" id="City" onChange="TCN_reload(this)" style="width:200px">
<option>Select a City =></option>
</select></td>
</tr>
<tr valign="baseline" class="normaltext">
<td colspan="2" valign="top" class="p3"><div align="left">
<img src="captcha.php" name="image" id="image"alt=""> <a href="#" onClick="javascript: document.getElementById('image').src = 'captcha.php?' + Math.random();">Refresh Image</a><br>
Enter Code:<span class="topmenusm">(please read carefully, refresh page if needed)</span> <br>
<input name="vercode" type="text" maxlength="5" /><?php echo $error;?><?php echo $success?>
</div>
<div align="left">
<?php
$random_chars2 = substr(str_shuffle('abcdefghijklmnopqrstuvwxyz'), 0, 6);
$_SESSION['secret']=$random_chars2;
?><input type="hidden" name="DateJoined" value="<?php echo $time;?>" size="32"><input type="hidden" name="ipaddress" value="<?PHP echo $ipaddress1;?>" size="32"><input type="hidden" name="active" value="N">
<input type="hidden" name="randomkey" value='<?php echo $_SESSION['secret']; ?>' readonly="True" > </div></td></tr><tr valign="baseline" class="normaltext">
<td colspan="2" nowrap class="p3"><div align="center">
<input name="subbutton" type="submit" id="subbutton" onClick="YY_checkform('form1','username','#q','0','Username !','usernamec','#username','6','Confirm Username!','email','#S','2','Email!','emailc','#em ailc','6','Confirm Email!','StuName','#q','0','What is your Firstname?','StuSurname','#q','0','What is your Lastname?','StuTelephone','#q','0','Telephone is required \(numeric only!\)','StuCellphone','#q','0','Cellphone is required \(numeric only!\)','Province','#q','1','Select a Province!','City','#q','1','Select a City!','password','#q','0','Password!','passwordc' ,'#password','6','Confirm Password!','StuContact_times','#q','0','Contact times is required!');return document.MM_returnValue" value="Register" />
</div></td></tr></table><input type="hidden" name="MM_insert" value="form1"></form>

davidj
05-10-2007, 10:47 AM
you have to check that your form fields are named as you have your $_POST's variables

The form action should be set to your detail page

and the from method should be set to POST

Paws
05-10-2007, 10:53 AM
Wrong data...

But I am unable to edit the post as it says I need it to be 10000 characters.

Paws
05-10-2007, 10:56 AM
Unable to post entire page.
So here is the FORM tags:

<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
<table width="100%" cellspacing="0" class="tableborder">
<tr valign="baseline" class="normaltext">
<td colspan="2" valign="top" nowrap bgcolor="#E8E8E8"><div align="left" class="p3"><strong>Please enter your username, password and email:</strong></div></td>
</tr>
<tr class="normaltext">
<td valign="top" nowrap class="p3"><div align="left">*Username: (6 or more characters) <br />
<input name="username" type="text" id="username" value="<?php echo $_POST['username']; ?>" size="25"/>
</div></td>
<td valign="top" nowrap="nowrap" class="p3"><div align="left">*Confirm Username: <br />
<input name="usernamec" type="text" id="usernamec" value="" size="25" />
</div></td>
</tr>
<tr class="p3">
<td valign="top" nowrap class="p3"><div align="left"> *Password:<br />
<input name="password" type="password" id="password" value="<?php echo $_POST['password']; ?>" size="25" />
</div></td>
<td valign="top" class="p3"><div align="left"> *Confirm Password:<br />
<input name="passwordc" type="password" id="passwordc" value="" size="25" />
</div></td>
</tr>
<tr class="normaltext">
<td valign="top" nowrap class="p3"><div align="left">*Email: (valid email)<br />
<input name="email" type="text" id="email" value="<?php echo $_POST['email']; ?>" size="25" />
</div></td>
<td valign="top" class="p3"><div align="left"> *Confirm Email:<br />
<input name="emailc" type="text" id="emailc" value="" size="25" />
</div></td>
</tr>
<tr valign="top" class="normaltext">
<td colspan="2" valign="top" nowrap bgcolor="#E8E8E8"><div align="left" class="p3"><strong>Personal infromation:</strong></div></td>
</tr>
<tr valign="baseline" class="normaltext">
<td valign="top" nowrap class="p3"><div align="left"> *FirstName:<br />
<input type="text" name="StuName" value="<?php echo $_POST['StuName']; ?>" size="25" />
</div></td>
<td valign="top" class="p3"><div align="left"> *Lastname:<br />
<input type="text" name="StuSurname" value="<?php echo $_POST['StuSurname']; ?>" size="25" />
</div></td>
</tr>
<tr valign="top" class="normaltext">
<td valign="top" nowrap class="p3"><div align="left"> *Telephone:(0213334444)<br />
<input name="StuTelephone" type="text" onKeyUp="javascript:checkNumber(form1.StuTelephone);" value="<?php echo $_POST['StuTelephone']; ?>" size="25" maxlength="10"/>
</div></td>
<td valign="top" nowrap="nowrap" class="p3"><div align="left"> *Cellphone:( 0834445555)<br />
<input name="StuCellphone" type="text" onKeyUp="javascript:checkNumber(form1.StuCellphone);" value="<?php echo $_POST['StuCellphone']; ?>" size="25" maxlength="10"/>
</div></td>
</tr>
<tr valign="baseline" class="normaltext">
<td colspan="2" valign="top" nowrap bgcolor="#E8E8E8"><div align="left" class="p3"><strong>Best Contact Times:</strong></div></td>
</tr>
<tr valign="baseline" class="normaltext">
<td colspan="2" valign="top" nowrap class="p3"><div align="left">Between
<select name="time1" id="time1"
onchange="updateTimes();document.form1.StuContact_times.valu e='Between ' + document.form1.time1.value + ' and '+ document.form1.time2.value">
<?php
do {
?>
<option value="<?php echo $row_rstimes['timeformat']?>"><?php echo $row_rstimes['timeformat']?></option>
<?php
} while ($row_rstimes = mysql_fetch_assoc($rstimes));
$rows = mysql_num_rows($rstimes);
if($rows > 0) {
mysql_data_seek($rstimes, 0);
$row_rstimes = mysql_fetch_assoc($rstimes);
}
?>
</select>
and
<select name="time2" id="time2" onChange="document.form1.StuContact_times.value= 'Between ' + document.form1.time1.value + ' and '+ document.form1.time2.value">
<option value="">(Select One)</option>
<?php
do {
?>
<option value="<?php echo $row_rstimes['timeformat']?>"><?php echo $row_rstimes['timeformat']?></option>
<?php
} while ($row_rstimes = mysql_fetch_assoc($rstimes));
$rows = mysql_num_rows($rstimes);
if($rows > 0) {
mysql_data_seek($rstimes, 0);
$row_rstimes = mysql_fetch_assoc($rstimes);
}
?>
</select>
<input type="hidden" name="StuContact_times" value="" size="25" /></div></td>
</tr>
<tr valign="baseline" class="normaltext">
<td colspan="2" valign="top" class="p3">
<div align="left">
<input name="chkMonday" type="checkbox" id="chkMonday" value="Monday" />Monday
<input name="chkTuesday" type="checkbox" id="chkTuesday" value="Tuesday" />Tuesday
<input name="chkWednesday" type="checkbox" id="chkWednesday" value="Wednseday" />Wednesday
<input name="chkThursday" type="checkbox" id="chkThursday" value="Thursday" />Thursday
<input name="chkFriday" type="checkbox" id="chkFriday" value="Friday" />Friday
<br><input name="chkSaturday" type="checkbox" id="chkSaturday" value="Saturday" />Saturday
<input name="chkSunday" type="checkbox" id="chkSunday" value="Sunday" />Sunday</div>
</td>
</tr>
<tr ="baseline" class="normaltext">
<td colspan="2" valign="top" nowrap bgcolor="#E8E8E8" ><div align="left" class="p3"><strong>Where can you be reached:</strong></div></td>
</tr>
<tr valign="baseline" class="normaltext">
<td valign="top" nowrap class="p3"><p>*Province:<br>
<select name="Province" id="Province" onChange="TCN_reload(this)" style="width:200px">
<option>Select a Province =&gt;</option>
</select>
</td>
<td valign="top" class="p3">
*City:<br>
<select name="City" id="City" onChange="TCN_reload(this)" style="width:200px">
<option>Select a City =></option>
</select></td>
</tr>
<tr valign="baseline" class="normaltext">
<td colspan="2" valign="top" class="p3"><div align="left">
<img src="captcha.php" name="image" id="image"alt=""> <a href="#" onClick="javascript: document.getElementById('image').src = 'captcha.php?' + Math.random();">Refresh Image</a><br>
Enter Code:<span class="topmenusm">(please read carefully, refresh page if needed)</span> <br>
<input name="vercode" type="text" maxlength="5" /><?php echo $error;?><?php echo $success?>
</div>
<div align="left">
<?php
$random_chars2 = substr(str_shuffle('abcdefghijklmnopqrstuvwxyz'), 0, 6);
$_SESSION['secret']=$random_chars2;
?><input type="hidden" name="DateJoined" value="<?php echo $time;?>" size="32"><input type="hidden" name="ipaddress" value="<?PHP echo $ipaddress1;?>" size="32"><input type="hidden" name="active" value="N">
<input type="hidden" name="randomkey" value='<?php echo $_SESSION['secret']; ?>' readonly="True" > </div></td></tr><tr valign="baseline" class="normaltext">
<td colspan="2" nowrap class="p3"><div align="center">
<input name="subbutton" type="submit" id="subbutton" onClick="YY_checkform('form1','username','#q','0','Username !','usernamec','#username','6','Confirm Username!','email','#S','2','Email!','emailc','#em ailc','6','Confirm Email!','StuName','#q','0','What is your Firstname?','StuSurname','#q','0','What is your Lastname?','StuTelephone','#q','0','Telephone is required \(numeric only!\)','StuCellphone','#q','0','Cellphone is required \(numeric only!\)','Province','#q','1','Select a Province!','City','#q','1','Select a City!','password','#q','0','Password!','passwordc' ,'#password','6','Confirm Password!','StuContact_times','#q','0','Contact times is required!');return document.MM_returnValue" value="Register" />
</div></td></tr></table><input type="hidden" name="MM_insert" value="form1"></form>

Paws
05-10-2007, 11:02 AM
This is what's on the detail page:


<?php
$username = $_POST["username"];
$password = $_POST["password"];
$email = $_POST["Email"];
$name = $_POST["StuName"];
$lastname = $_POST["StuSurname"];
$cnhome = $_POST["StuTelephone"];
$cncell = $_POST["StuCellphone"];
$dtjoined = $_POST["DateJoined"];
$IPadd = $_POST["ipaddress"];
$active_ = $_POST["active"];
$randomkey = $_POST["randomkey"];
?>

davidj
05-10-2007, 11:09 AM
replace


<?php echo $editFormAction; ?>


with the name of your detail page

Paws
05-10-2007, 11:15 AM
No luck, nice try though...:mrgreen:

davidj
05-10-2007, 11:15 AM
post the form as you have it now

Paws
05-10-2007, 11:17 AM
If I use GET then I do see data; but not the correct way to send form data.

Paws
05-10-2007, 11:18 AM
post the form as you have it now

The text that you have entered is too long (12188 characters). Please shorten it to 10000 characters long.

Can't post the whole page or form?

davidj
05-10-2007, 12:42 PM
the form is that big?

post the form in sections

Paws
05-10-2007, 01:18 PM
<form action="<?php echo $editFormAction; ?>" method="POST" name="form1" id="form1"><table width="100%" cellspacing="0" class="tableborder"><tr valign="baseline" class="normaltext">
<td colspan="2" valign="top" nowrap bgcolor="#E8E8E8"><div align="left" class="p3"><strong>Please enter your username, password and email:</strong></div></td></tr><tr class="normaltext"><td valign="top" nowrap class="p3"><div align="left">*Username: (6 or more characters) <br /><input name="username" type="text" id="username" value="<?php echo $_POST['username']; ?>" size="25"/></div></td><td valign="top" nowrap="nowrap" class="p3"><div align="left">*Confirm Username: <br />
<input name="usernamec" type="text" id="usernamec" value="" size="25" />
</div></td></tr><tr class="p3"><td valign="top" nowrap class="p3"><div align="left"> *Password:<br /><input name="password" type="password" id="password" value="<?php echo $_POST['password']; ?>" size="25" />
</div></td><td valign="top" class="p3"><div align="left"> *Confirm Password:<br /><input name="passwordc" type="password" id="passwordc" value="" size="25" /></div></td></tr><tr class="normaltext">
<td valign="top" nowrap class="p3"><div align="left">*Email: (valid email)<br /><input name="email" type="text" id="email" value="<?php echo $_POST['email']; ?>" size="25" /></div></td><td valign="top" class="p3"><div align="left"> *Confirm Email:<br /><input name="emailc" type="text" id="emailc" value="" size="25" /></div></td></tr><tr valign="top" class="normaltext"><td colspan="2" valign="top" nowrap bgcolor="#E8E8E8"><div align="left" class="p3"><strong>Personal infromation:</strong></div></td></tr><tr valign="baseline" class="normaltext"><td valign="top" nowrap class="p3"><div align="left"> *FirstName:<br /><input type="text" name="StuName" value="<?php echo $_POST['StuName']; ?>" size="25" /></div></td><td valign="top" class="p3"><div align="left"> *Lastname:<br /><input type="text" name="StuSurname" value="<?php echo $_POST['StuSurname']; ?>" size="25" /></div></td></tr><tr valign="top" class="normaltext">
<td valign="top" nowrap class="p3"><div align="left"> *Telephone:(0213334444)<br /><input name="StuTelephone" type="text" onKeyUp="javascript:checkNumber(form1.StuTelephone);" value="<?php echo $_POST['StuTelephone']; ?>" size="25" maxlength="10"/>
</div></td><td valign="top" nowrap="nowrap" class="p3"><div align="left"> *Cellphone:( 0834445555)<br /><input name="StuCellphone" type="text" onKeyUp="javascript:checkNumber(form1.StuCellphone);" value="<?php echo $_POST['StuCellphone']; ?>" size="25" maxlength="10"/>
</div></td></tr><tr valign="baseline" class="normaltext">
<td colspan="2" valign="top" nowrap bgcolor="#E8E8E8"><div align="left" class="p3"><strong>Best Contact Times:</strong></div></td>
</tr><tr valign="baseline" class="normaltext"><td colspan="2" valign="top" nowrap class="p3"><div align="left">Between<select name="time1" id="time1"onchange="updateTimes();document.form1.StuContact_times.valu e='Between ' + document.form1.time1.value + ' and '+ document.form1.time2.value">
<?php
do {
?><option value="<?php echo $row_rstimes['timeformat']?>"><?php echo $row_rstimes['timeformat']?></option><?php
} while ($row_rstimes = mysql_fetch_assoc($rstimes));$rows = mysql_num_rows($rstimes);if($rows > 0) {mysql_data_seek($rstimes, 0);
$row_rstimes = mysql_fetch_assoc($rstimes);}?></select>and
<select name="time2"id="time2"onChange="document.form1.StuContact_times.value= 'Between ' + document.form1.time1.value + ' and '+document.form1.time2.value"><option value="">(Select One)</option>
<?php
do {
?><option value="<?php echo $row_rstimes['timeformat']?>"><?php echo $row_rstimes['timeformat']?></option><?php
} while ($row_rstimes = mysql_fetch_assoc($rstimes));
$rows = mysql_num_rows($rstimes);if($rows > 0) {
mysql_data_seek($rstimes, 0);$row_rstimes = mysql_fetch_assoc($rstimes);}?></select><input type="hidden" name="StuContact_times" value="" size="25" /></div></td>
</tr><tr valign="baseline" class="normaltext">
<td colspan="2" valign="top" class="p3"><div align="left">
<input name="chkMonday" type="checkbox" id="chkMonday" value="Monday" />Monday <input name="chkTuesday" type="checkbox" id="chkTuesday" value="Tuesday" />Tuesday <input name="chkWednesday" type="checkbox" id="chkWednesday" value="Wednseday" />Wednesday
<input name="chkThursday" type="checkbox" id="chkThursday" value="Thursday" />Thursday <input name="chkFriday" type="checkbox" id="chkFriday" value="Friday" />Friday <br><input name="chkSaturday" type="checkbox" id="chkSaturday" value="Saturday" />Saturday
<input name="chkSunday" type="checkbox" id="chkSunday" value="Sunday" />Sunday</div></td></tr><tr ="baseline" class="normaltext">
<td colspan="2" valign="top" nowrap bgcolor="#E8E8E8" ><div align="left" class="p3"><strong>Where can you be reached:</strong></div></td>
</tr><tr valign="baseline" class="normaltext">
<td valign="top" nowrap class="p3"><p>*Province:<br>
<select name="Province" id="Province" onChange="TCN_reload(this)" style="width:200px"><option>Select a Province =&gt;</option>
</select></td><td valign="top" class="p3">*City:<br>
<select name="City" id="City" onChange="TCN_reload(this)" style="width:200px"><option>Select a City =></option>
</select></td></tr><tr valign="baseline" class="normaltext">
<td colspan="2" valign="top" class="p3"><div align="left">
<img src="captcha.php" name="image" id="image"alt=""> <a href="#" onClick="javascript: document.getElementById('image').src = 'captcha.php?' + Math.random();">Refresh Image</a><br>
Enter Code:<span class="topmenusm">(please read carefully, refresh page if needed)</span> <br><input name="vercode" type="text" maxlength="5" /><?php echo $error;?><?php echo $success?></div>
<div align="left"><script language="JavaScript" type="text/javascript">
<?php
$random_chars2 = substr(str_shuffle('abcdefghijklmnopqrstuvwxyz'), 0, 6);
$_SESSION['secret']=$random_chars2;
?><input type="hidden" name="DateJoined" value="<?php echo $time;?>" size="32"> <input type="hidden" name="ipaddress" value="<?PHP echo $ipaddress1;?>" size="32"><input type="hidden" name="active" value="N">
<input type="hidden" name="randomkey" value='<?php echo $_SESSION['secret']; ?>' readonly="True" ></div></td></tr>
<tr valign="baseline" class="normaltext"><td colspan="2" nowrap class="p3"><div align="center"><input name="subbutton" type="submit" id="subbutton" onClick="YY_checkform('form1','username','#q','0','Username !','usernamec','#username','6','Confirm Username!','email','#S','2','Email!','emailc','#em ailc','6','Confirm Email!','StuName','#q','0','What is your Firstname?','StuSurname','#q','0','What is your Lastname?','StuTelephone','#q','0','Telephone is required \(numeric only!\)','StuCellphone','#q','0','Cellphone is required \(numeric only!\)','Province','#q','1','Select a Province!','City','#q','1','Select a City!','password','#q','0','Password!','passwordc' ,'#password','6','Confirm Password!','StuContact_times','#q','0','Contact times is required!');return document.MM_returnValue" value="Register" />
</div></td></tr></table><input type="hidden" name="MM_insert" value="form1"></form>

Paws
05-10-2007, 01:25 PM
That's the entire form.

davidj
05-10-2007, 01:30 PM
where you have


<form action="<?php echo $editFormAction; ?>"


change this to...


<form action="detail_page.php" //<< change to suit


PS: I like your take on randomising.

$random_chars2 = substr(str_shuffle('abcdefghijklmnopqrstuvwxyz'), 0, 6);

its a neat way.

Paws
05-10-2007, 01:38 PM
No username has been selected!

Paws
05-10-2007, 01:44 PM
Ok seems to be working without changing that values like you said.

I understand what you mean but that always isn't the case, I think it is my dreamweaver or PC that is screwed???:mrgreen:

Thank you for taking the time to look at my PROBLEMS!!!:confused:

SUX but hey it's working.:mrgreen:

Paws
05-11-2007, 09:35 AM
Thank you helpful posts, BUT -

I have tried a new page same data but no luck!
I am having sh1t with Dreamweaver!!!
I have no idea why when I copy the form out into a new page it works.

After an "Update" or "Insert" using dreamweaver's infamous behaviours it stops POSTING the data!:confused:

It works on the GET option but not POST!!!
Any ideas?

davidj
05-11-2007, 10:58 AM
sorry mate

i cant help with dreamweaver behaviors. I only offer assistance to those who have hand coded. I am taking a backseat from dreamweaver code from now on. Dont get me wrong coz i like DW as an HTML / JS IDE but not for PHP.

If ever you decide you want to learn PHP then let me know.

Paws
05-11-2007, 11:10 AM
It's a funny thing, I was thinking that as I was developing this site:
Dreamweaver or Hand code:

With Dreamweaver it just got quicker so Hand coding was only needed for mail scripts and so on.

Sure if hand coding is what it takes, what do you have?

Paws
05-11-2007, 11:12 AM
Just another note to add:
Why is dreamweaver not doing what is needed?
I am all for hand coding just interested???

chriskq
05-11-2007, 11:40 AM
USe a text editor like homesite...
i hand code.
but mainly html/css/js some php and asp but all hand coded into the cvs respoitory used via eclipse interface at work anyways......

at home i just do basic php atm

Paws
05-11-2007, 11:49 AM
Well I had Homesite but it didn't have what I needed it to do.

So this is all worthwhile, so where do I start?
The handcoding part I mean.

davidj
05-11-2007, 01:40 PM
you have to understand that dreamweaver has only a few eggs in its basket regarding application development and as long as your omelet (application) needs just those eggs then your ok BUT if you dare add cheese or peppers or mushrooms then thats when your meal starts looking like a dogs dinner</analogy>

if your wanting a bespoke system then dreamweaver fools you into thinking that its the quicker option but its not! As soon as you do something obscure or tricky it falls over and because you dont understand what you have done then you cant fix it because it wasnt you who wrote it it was dreamweaver!

start here...

http://www.dreamweaverclub.com/vtm/php-mysql-apache.php

when you have completed those and understood them (not just copied them parrot fashion) come back and we will work on your problem together. Plus you will understand the language at the same time.

a win win situation

Paws
05-11-2007, 01:51 PM
Thanks davidj, I guess with your way it has to be done.
I have watched your video tuts and they were informative except there were some session issues but that was quick to fix (//session or /*session*/)
I am not a hand-coder by nature but that is the way I learnt it; so here goes again.
Thanks

davidj
05-11-2007, 01:55 PM
(//session or /*session*/)


both do the same thing...

they comment out the string "session"

?

Paws
05-11-2007, 02:12 PM
Yes they do, I was just placing them both there as I can't remember which one I used to comment it out.

Paws
05-13-2007, 07:41 AM
Thank you all for help as I have managed to sort it out.
The idea was simple:
Register => Email => Activate => Login |

I have set up the Registration & Email on one page and the Activate and Email on another.

also davidj those tuts are ok but unable to hear as my PC is screwed!

Thank you once again for help.