Hi. I can get this data to submit but can't get it to display. Here is my code... I put a space before the line of code that won't function.
//Connect to the database
$connection=pg_connect("host=$host dbname=$db user=$user");
if (!$connection)
{
echo "Sorry, could not establish a connection";
}
//Accept form variables
$office = $POST['office'];
$county = $POST['county'];
$case_no = $POST['case_no'];
$updated_case_no = $POST['updated_case_no'];
$date_opened = $POST['date_opened'];
$attorney = $POST['attorney'];
$case_type = $POST['case_type'];
$class = $POST['class'];
$first_name = $POST['first_name'];
$middle_i = $POST['middle_i'];
$last_name = $POST['last_name'];
$dob = $POST['dob'];
$ssn = $POST['ssn'];
$address1 = $POST['address1'];
$address1a = $POST['address1a'];
$address2 = $POST['address2'];
$address2a = $POST['address2a'];
$city = $POST['city'];
$state = $POST['state'];
$zip = $POST['zip'];
$phone1 = $POST['phone1'];
$phone2 = $POST['phone2'];
$div = $POST['div'];
$judge = $POST['judge'];
$involves = $POST['involves'];
$investigator = $POST['investigator'];
$discovery_request_date = $POST['discovery_request_date'];
$comments = $POST['comments'];
//Create SQL insert (May need to change exec to query in pg command)
$query="INSERT INTO stmbt_client_test (id, office, county, case_no, updated_case_no, date_opened, attorney, case_type, class, first_name, middle_i, last_name, dob, ssn, address1, address1a, address2, address2a, city, state, zip, phone1, phone2, div, judge, involves, investigator, discovery_request_date, comments) VALUES (nextval('stmbt_client_test_id_seq'), '$office', '$county', '$case_no', '$updated_case_no', '$date_opened', '$attorney', '$case_type', '$class', '$first_name', '$middle_i', '$last_name', '$dob', '$ssn', '$address1', '$address1a', '$address2', '$address2a', '$city', '$state', '$zip', '$phone1', '$phone2', '$div', '$judge', '$involves', '$investigator', '$discovery_request_date', '$comments')";
$result=pg_exec($connection, $query);
if (!result)
{
echo "Nope.";
}
else
{
echo "Succesful.";
$myrow = pg_fetch_array($result,$row);
?>
<body bgcolor="#CDC7AB">
<div align="left">
<table border="0" bordercolor="black" cellpadding="1" cellspacing="0" width="700" valign="top">
<tr valign="top">
<td width="100%" height="1099">
<div align="left">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td width="100%">
<div align="left">
<table border="2" cellpadding="0" cellspacing="0" width="100%" bgcolor="#FFFFFF">
<tr>
<td width="100%">
<p align="center"><img border="0" src="../images/titles/main.gif" width="600" height="60"></p>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td width="100%" align="center">
<p> </p>
<table border="1" cellpadding="2" cellspacing="0" width="551" bgcolor="#4A607B" bordercolorlight="#FFFFFF" bordercolordark="#4A607B">
<tr align="center">
<td width="531" align="right" colspan="3">
<p align="center"><font color="#C6CE7B"><font face="Arial Black" size="4"> Add
Successful: Here are your results</font></font></p>
</td>
</tr>
<tr align="center">
<td width="106" align="right"><font size="2" face="Arial" color="#FFFFFF"><b>Office:</b></font></td>
<td width="143">
<p align="left"><font size="2" face="Arial" color="#C6CE7B">
<? printf ("%s", $myrow['office']); ?>