Variables! Notice: Undefined index:
Posted: Wed May 11, 2005 12:18 am
Hey Gang,
Could some one point me in the right direction.
I thought I was setting the variables with the $_GET lines below.
Cheers, Will
Could some one point me in the right direction.
I thought I was setting the variables with the $_GET lines below.
Cheers, Will
Code: Select all
<?
include "../includes/functions.inc";
include "../includes/common_db.inc";
$link_id = db_connect($db_materials);
// Set global variables to easier names
$description = $_GET['description'];
$basisWeight = $_GET['basisWeight'];
$sql_add = "INSERT INTO austock values('','$description','$basisWeight','','','','','','','','','','','','','','','','','','')";
mysql_query($sql_add) or die(mysql_error());
?>
<form method='get' action='<?php echo $_SERVER['PHP_SELF']; ?>'>
<table class=\"sample\"><tr>
<td width=200px colspan=2 valign=top >Description</td>
<td width=200px colspan=3><input type='text' name='description' SIZE="20"></td></tr>
<tr><td width=200px colspan=2 valign=top>Basis Weight</td>
<td width=200px colspan=3><input type='text' name='basisWeight' SIZE="20"></td></tr>
<tr><td width=200px colspan=2 valign=top>Caliper</td>
<td width=200px colspan=3><input type='text' name='caliper' SIZE="20"></td></tr>
<tr><td width=200px colspan=2 valign=top>Wet Tensile Strength CD</td>
<td width=50px colspan=2><input type='text' name='wetTensileStrenghtCD' value="<?php echo $wetTensileStrenghtCD ?>" SIZE="20"></td></tr>
<tr><td width=200px colspan=2 valign=top>Dry Tensile Strength CD</td>
<td width=50px colspan=2><input type='text' name='wetTensileStrenghtMD' value="<?php echo $wetTensileStrenghtMD ?>" SIZE="20"></td</tr>
<tr><td width=100px colspan=2 valign=top><input type='reset' class='btn' value='Reset Face Stock'></td>
<td width=100px colspan=3><input type='submit' name='addFs' class='btn' value='Add Face Stock'></td></tr>
</form>
<?
?>