PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<p><b>Special Notes :</b> <textarea name="comments"
rows="3" cols="40">
</textarea>
</fieldset>
</p> <hr /> <br />
<?php
require_once ('./php/mysql_connect.php'); // Connect to the db.
$cusid=$_SESSION['cusid'];
$query="SELECT relcusid, concat(authsign,' [', signtitle, ']') as [b]mysig[/b] FROM relsignor
WHERE relcusid=$cusid";
$result = mysql_query ($query);
echo "<select name = [b]mysig [/b]value=''>[b]mysig[/b]</option>";
// printing the list box select command
while($nt=mysql_fetch_array($result)){//Array or records stored in $nt
echo "<option value=$nt[relcusid]>$nt[[b]mysig[/b]]</option>";
/* Option values are added by looping through the array */
}
echo "</select>";// Closing of list box
?>
<p><b>Signature to use: </b> </p><br />
<hr />
<div align="center"><input type="submit"
name="submit" value="Submit My Information" />
<input type="hidden" name="submitted" value="TRUE" />
</div>
</form>
The upper portion of this code is and that is where the next session values are being created and saved:
if (isset($_POST['submitted'])) {
$_SESSION['comments']=$_REQUEST['comments']; //this value is being returned and stored correctly. $_SESSION['mysig']=$_REQUEST['mysig']; //This is the problem value as it is returning the "relcusid" instead of "mysig"
So problem is I am getting the customer cusid value instead of the username and title value that is to be inserted in the next form.
Mahalo for your help
Last edited by Benjamin on Fri Jun 04, 2010 12:37 am, edited 1 time in total.
Reason:Added [syntax=php] tags.
Mahalo ZEUS, it is now partially working, however it is only storing part of the value.
Value in field (authsign) is JR WALLENQUICK and value in field (signtitle) is TREASURER. With the CONCAT the value of mysig should be JR WALLENQUICK[TREASURER] but the value being printed out on the next form is JR. For a test I removed the JR in the Authsign field and then the value printed on the form was WALLENQUICK[TREASURER]. So the problem is with the space in the name. How is this solved? Mahalo