Can anyone help?
CODE
<? include("../../inc/topa.php"); ?>
<!-- START BODY -->
<td colspan="12" class="white">
<center><b>Admin Area</b></center><br>
Add Product Line:<br>
<?
require("../../inc/puppies.php");
switch (@$_GET['do'])
{
default:
echo "<form action='?do=step2' method='post'><br>
Name: <input type='text' name='newname'><br>
Picture: <input type='text' name='newpic'><br>
<input type='submit' value='Submit'>
</form>";
break;
case "step2":
$newname = $_POST['newname'];
$newpic = $_POST['newpic'];
if (!empty($newpic))
{
$urlf = "<img src=$newpic>";
} else
{
$urlf = " ";
}
$add = mysql_query("INSERT INTO products (name, img, url) VALUES ('$newname','$newpic','$urlf')") or die("Couldn't add product line.");
echo "Product line added.";
break;
}
?>
</td>
<!-- END BODY -->
<? include("../../inc/bottoma.php"); ?>
<!-- START BODY -->
<td colspan="12" class="white">
<center><b>Admin Area</b></center><br>
Add Product Line:<br>
<?
require("../../inc/puppies.php");
switch (@$_GET['do'])
{
default:
echo "<form action='?do=step2' method='post'><br>
Name: <input type='text' name='newname'><br>
Picture: <input type='text' name='newpic'><br>
<input type='submit' value='Submit'>
</form>";
break;
case "step2":
$newname = $_POST['newname'];
$newpic = $_POST['newpic'];
if (!empty($newpic))
{
$urlf = "<img src=$newpic>";
} else
{
$urlf = " ";
}
$add = mysql_query("INSERT INTO products (name, img, url) VALUES ('$newname','$newpic','$urlf')") or die("Couldn't add product line.");
echo "Product line added.";
break;
}
?>
</td>
<!-- END BODY -->
<? include("../../inc/bottoma.php"); ?>
