Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End can't get form on webpage to post to table/database on remote server Reply To: can't get form on webpage to post to table/database on remote server

#209629
Great Scott
Participant

Here’s the CustomerForm.php

<?php
if (array_key_exists(‘GroomingID’,$_POST))
{
$action = ‘Edit’;
$formFlag = ‘Updating’;
}
else
{
$action = ‘Add’;
$formFlag = ‘Submitted’;
}
?>

<form method=”post” action=”groomingservices2.php”>
<input type=”hidden” name=”<?php echo $formFlag ?>” value=”true”>
<?php
if (array_key_exists(‘GroomingID’,$_POST))
{
echo “<input type=’hidden’ name=’GroomingID’ value=’$groomingID’>”;
}
?>
<table align=”center” border=”1″ width=”500″>
<?php
echo textEntry(‘First name’,’FirstName’,$dbEntries,$errors,15);
echo textEntry(‘Last name’,’LastName’,$dbEntries,$errors,15);
echo textEntry(‘Address’,’Address’,$dbEntries,$errors,50);
echo textEntry(‘City’,’City’,$dbEntries,$errors,30);
echo textEntry(‘State’,’State’,$dbEntries,$errors,5);
echo textEntry(‘Zip’,’Zip’,$dbEntries,$errors,10);
echo textEntry(‘Phone Number’,’PhoneNumber’,$dbEntries,$errors,15);
echo textEntry(‘Email’,’Email’,$dbEntries,$errors,25);
echo selectEntry(‘Pet Type’,’PetType’,$petTypeEntries,$errors,$dbEntries[‘PetType’]);
echo textEntry(‘Pet Name’,’PetName’,$dbEntries,$errors,30);

    echo checkboxEntry('Neutered or Spayed','NeuteredOrSpayed',
        $dbEntries,$errors,
        array('Neutered','Spayed'));
    echo textEntry('Pet Age','PetAge',$dbEntries,$errors,10);
?&gt;
&lt;tr&gt;
    &lt;td colspan="2"&gt;&lt;input type="submit" value="&lt;?php echo $action ?&gt; Customer"&gt;&lt;/td&gt;
&lt;/tr&gt;

</table>
</form>