Location: PHPKode > projects > RecipeNet > add.php
<?php $sitesection="Add A Recipe"; include 'header.php';
echo '<p align="center"><strong>Add A Recipe</strong></p>'; if ($_GET['step'] < '0') { ?>
<p align="center">&nbsp;</p>
<form name="form1" method="post" action="add.php?step=2">
  <p>Recipe Name: 
    <input type="text" name="rname">
  <p>Submitted By: 
    <input type="text" name="rsb" /> 
    Original Creator: 
    <input type="text" name="rcb" />
  <p>Number of Ingredients: 
    <input name="rnuming" type="text" size="10" maxlength="10" /> 
    Number of <strong>main</strong> ingredients: 
    <input name="rnumain" type="text" size="10" maxlength="10" />
  <p>Type of food: 
    <input type="text" name="rgenre" />
  <p>Level (easy, medium, hard): 
    <input type="text" name="rlevel" /> 
    Approx. Time (Minutes): 
    <input type="text" name="rtime" />
  <p><textarea name="ring" cols="50" rows="15">Type the ingredients here.</textarea></p>
  <p><textarea name="rtxt" cols="50" rows="15">Type the recipe here.</textarea>
    <input type="submit" name="Submit" value="Submit" />
if ($_GET['step'] == '2') {
$iq="insert into `rn_recipes` ( `id`, `name`, `submit`, `creator`, `numing`, `numain`, `genre`, `level`, `time`, `ing`, `text` ) values (  '',  '$rname',  '$rsb',  '$rcb',  '$rnuming',  '$rnumain',  '$rgenre',  '$rlevel',  '$rtime',  '$ring',  '$rtxt' )";
@mysql_select_db($db) or die( "Unable to select database");
echo 'Your Recipe has been added to our database.  <a href="index.php">Home</a>';
echo '</body></html>';
Return current item: RecipeNet