I have this php code that I can get most of the data to post, but I am having a little bit of trouble..
I am passing the actualy student number to the page i.e. ?&id=1 this is used to pull the information from another table.
When I submit this data, it will post the time, date and the sender id... but nothing else is posted.
Here is the code.
[php]
<?
include('db.php ');
if ($myID == 0) header("locatio n:login.php");
if ($admin == 0) header("locatio n:login.php");
include("navtop .php");
include("nav.ph p");
include("func.p hp");
connect1();
$now = date('m/d/Y');
$t = date('h:i A');
_v('mode;i:id') ;
_v('msg_from,ms g_to,msg_body,m sg_date,msg_tim e,msg_subject,m sg_isread,msg_s id,msg_tid');
if ($mode=='adds')
{
_v('msg_from,ms g_to,msg_body,m sg_date,msg_tim e,msg_subject,m sg_isread,msg_s id,msg_tid');
$query = mysql_query("IN SERT INTO email VALUES ('' ,'$from', '$to', '$msg', '$now', '$t', '$subject', '1', '$myID', '$tid')") or die(mysql_error ());
echo " <br><br><br><Br > ";
goto('mail.php' );
die();
}
$query = mysql_query("SE LECT * FROM `instructors` WHERE id='$myID'");
$row = mysql_fetch_arr ay($query);
extract($row);
$name = $row['first_name'] . " " . $row['last_name'];
echo "
<td width=100% valign=top>
<table border=0 width=100% class=leftMenut op1><td>
</form>
<form method='post' name='frmado' action='emailme .php'>
<table border=0 width=99% cellpadding=0 cellspacing=0>
<Td wdith=100%>";
$query = mysql_query("SE LECT * from instructors WHERE id='$id'");
$Row = mysql_fetch_arr ay($query);
extract($Row);
$tid = $Row['id'];
$name1 = $Row['first_name'] . " " . $Row['last_name'];
echo "
<p><br><p><sp an class='text'>Fr om: <b>$name</b></p>
<p><span class='text'>To : <b>$name1 - $tid</b></p>
<p><span class='text'>Su bject<br>
<input type='text' size='50' name='subject' value='' id='subject' />
</p>
<p><span class='text'>En ter Message<br>
<textarea name='msg' id='msg' cols=50 rows=15 value=''></textarea>
<input type='hidden' name='to' value='$id'>
<input type='hidden' name='from' value='$name'>
<input type='hidden' name='mode' value='adds'>
<p><input type=submit name='submit' value='Send Message' class='input' >
</form>
</p>
</td>
</table>";
include('navbot .php');
?>
[/php]
Thank you
I am passing the actualy student number to the page i.e. ?&id=1 this is used to pull the information from another table.
When I submit this data, it will post the time, date and the sender id... but nothing else is posted.
Here is the code.
[php]
<?
include('db.php ');
if ($myID == 0) header("locatio n:login.php");
if ($admin == 0) header("locatio n:login.php");
include("navtop .php");
include("nav.ph p");
include("func.p hp");
connect1();
$now = date('m/d/Y');
$t = date('h:i A');
_v('mode;i:id') ;
_v('msg_from,ms g_to,msg_body,m sg_date,msg_tim e,msg_subject,m sg_isread,msg_s id,msg_tid');
if ($mode=='adds')
{
_v('msg_from,ms g_to,msg_body,m sg_date,msg_tim e,msg_subject,m sg_isread,msg_s id,msg_tid');
$query = mysql_query("IN SERT INTO email VALUES ('' ,'$from', '$to', '$msg', '$now', '$t', '$subject', '1', '$myID', '$tid')") or die(mysql_error ());
echo " <br><br><br><Br > ";
goto('mail.php' );
die();
}
$query = mysql_query("SE LECT * FROM `instructors` WHERE id='$myID'");
$row = mysql_fetch_arr ay($query);
extract($row);
$name = $row['first_name'] . " " . $row['last_name'];
echo "
<td width=100% valign=top>
<table border=0 width=100% class=leftMenut op1><td>
</form>
<form method='post' name='frmado' action='emailme .php'>
<table border=0 width=99% cellpadding=0 cellspacing=0>
<Td wdith=100%>";
$query = mysql_query("SE LECT * from instructors WHERE id='$id'");
$Row = mysql_fetch_arr ay($query);
extract($Row);
$tid = $Row['id'];
$name1 = $Row['first_name'] . " " . $Row['last_name'];
echo "
<p><br><p><sp an class='text'>Fr om: <b>$name</b></p>
<p><span class='text'>To : <b>$name1 - $tid</b></p>
<p><span class='text'>Su bject<br>
<input type='text' size='50' name='subject' value='' id='subject' />
</p>
<p><span class='text'>En ter Message<br>
<textarea name='msg' id='msg' cols=50 rows=15 value=''></textarea>
<input type='hidden' name='to' value='$id'>
<input type='hidden' name='from' value='$name'>
<input type='hidden' name='mode' value='adds'>
<p><input type=submit name='submit' value='Send Message' class='input' >
</form>
</p>
</td>
</table>";
include('navbot .php');
?>
[/php]
Thank you
Comment