Jump to content

back to basics going nutz


shaunmckinnon

Recommended Posts

i don't get this.  i use to know this simple stuff, and after a year it seems i forgot all of it.  anyways, i can't get any reaction from this form.  here's the form page:

<?
  //very simple invoicing system
?>
<?php require_once('Connections/connect_me.php'); ?>
<?php
mysql_select_db($database_connect_me, $connect_me);
$query_client = "SELECT * FROM client_data";
$client = mysql_query($query_client, $connect_me) or die(mysql_error());
$row_client = mysql_fetch_assoc($client);
$totalRows_client = mysql_num_rows($client);
?>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Simple Invoice</title>
<link href="invoiceCSS.css" rel="stylesheet" type="text/css">
</head>

<body>
<form name="invoice" method="post" action="test.php">
<select name="selecting">
  <?php
do {  
?>
  <option value="<?php echo $row_client['ID']?>"><?php echo $row_client['CLIENT_NAME']?></option>
  <?php
} while ($row_client = mysql_fetch_assoc($client));
  $rows = mysql_num_rows($client);
  if($rows > 0) {
      mysql_data_seek($client, 0);
  $row_client = mysql_fetch_assoc($client);
  }
?>

</select>
  <table id="invTbl" border="1px" bordercolor="#000000" cellspacing="0" cellpadding="0">
    <tr>
  <td align="center" class="headers">Date</td>
  <td align="center" class="headers">Description</td>
  <td align="center" class="headers">Quantity</td>
  <td align="center" class="headers">Price</td>
  <td align="center" class="headers">Subtotal</td>
</tr>
    <tr>
      <td bgcolor="#CCCC99"><input name="fields" type="text" id="date" class="allOthers" value="<? echo date('Y-m-d'); ?>" size="11"></td>
      <td bgcolor="#CCCC99"><input name="fields" type="text" id="description" class="allOthers" size="50"></td>
      <td bgcolor="#8EAE93"><input name="fields" type="text" id="quantity" class="qtyprcTotalCol"size="5"></td>
      <td bgcolor="#8EAE93">$<input name="fields" type="text" id="price" class="qtyprcTotalCol" size="6"></td>
  <td bgcolor="#C1E0FF">$<input name="fields" type="text" id="sub_total" class="subTotalCol" size="6"></td>
    </tr>
  </table>
  <input type="text" id="counterHidden">
  <input type="submit" id="submit" class="submit" size="6">
  <input type="reset" id="reset" class="submit" size="6">
  <input type="text" id="total" class="submit" size="6">  
</form>
</body>
</html>


<?php
mysql_free_result($client);
?>

 

and here's the test.php page it's being sent to:

<?php

$date=$_POST['date'];
$description=$_POST['description'];
$quantity=$_POST['quantity'];
$price=$_POST['price'];
$sub_total=$_POST['sub_total'];
echo '<br>'.$date;
echo '<br>'.$description;
echo '<br>'.$quantity;
echo '<br>'.$price;
echo '<br>'.$sub_total;

?>

it outputs the breaks, but not the info i paste in.  i'd link to the page, but it's on an internal server that's not out to the web.

any help would be appreciated.

 

thanks,

shaun :)

Link to comment
https://forums.phpfreaks.com/topic/111950-back-to-basics-going-nutz/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.