Hello All,
I am working with a members website and well i am trying to get the memberid # from the db to show up on a form as the members name.
Well I got that much but when the form is submitted by the member, it goes to another script but the id or name do not transfer over to the next page. I have tried to change the variable name and I have written a test pageso it “prints” on the screen so I can see it before trying to add the information to a table.
The whole idea is to have the id added to the new table so when scripts look up the information it is all associated by the id #.
I think I made a mistake in the form script but can’t see where it is.
Here is the portion of the code related to this issue if anyone see my mistake please let me know.
Add Character <?php include("misc.inc"); //8 $conn = mysql_connect($msql_server, $msql_user, $msql_password) or die ("Unable to Connect");mysql_select_db($msql_db, $conn) or die (“Unable to Connect to DB”);
$query = “SELECT * FROM memberinformation”;$result = mysql_query($query) or die (“Couldn’t execute query.”);
echo “n”;
echo ‘
’;
’;
echo ‘’; ’;
echo ‘’; ’;
echo ‘Players Name:’;
echo ‘
echo ‘’; ’;
echo “n”;
while ($row = mysql_fetch_array($result))
{
extract($row);
$name = “$memFirstName $memSurname”;
echo “$namen”;
$name = “$memberID”; ****** this is probably my mistake but even pulling this doesn’t get me the info I need.
}
echo “n”;
echo ‘
echo ‘echo ‘
’; ’;
echo ‘’; ’;
echo ‘Character Name:’;
echo ‘
echo ‘’; ’;
echo ‘’;
echo ‘
echo ‘echo ‘
’; ’;
echo ‘’; ’;
echo ‘Which Character:’;
echo ‘
echo ‘’; ’;
echo “primaryn”;
echo “secondaryn”;
echo “tertiaryn”;
echo “quaternaryn”;
echo “quinaryn”;
echo ‘
echo ‘echo ‘
’; ’;
echo ‘’; ’;
echo ‘Notes:’;
echo ‘
echo ‘’; ’;
echo ‘’;
echo ‘
echo ‘echo ‘
’; ’;
echo ‘’; ’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘
echo ‘
echo ‘
echo “n”;
?>
Now the page that accepts the form info.
<?phpinclude("…/misc.inc");
$name = $_POST [’$name’];
$characterName = $_POST [‘characterName’];
$wchar = $_POST [‘wchar’];
$characterNotes = $_POST [‘characterNotes’];echo “
”;
n”;
echo “”;
echo “n n”;
$memberID n
$characterName n
$wchar n
$characterNotes n
echo “n”; echo “
?>
Ok so thats what I got any help would be appreciated.