<?php
session_start();
$_SESSION['title'] = $_GET['form_book_title'];
$_SESSION['ISBN'] = $_GET['form_book_ISBN'];
$_SESSION['qty'] = $_GET['form_book_qty'];
$_SESSION['fName'] = $_GET['form_book_fName'];
$_SESSION['lName'] = $_GET['form_book_lName'];
if($_SESSION['ISBN']=="" || $_SESSION['title']=="" || $_SESSION['qty'] =="" || $_SESSION['lName'] =="" || $_SESSION['fName'] =="")
{
echo "please fill out all the form fields";
echo "<a href=\"sell.html\"> Go Back";
}else
require_once("db_info.php");
$con = mysql_connect($localhost,$username,$pw);
if(!$con) exit(mysql_error());
$db_select = mysql_select_db("book",$con) or exit(mysql_error());
$my_query = "INSERT INTO book_tbl (title)VALUES('".$_SESSION['title']."') ";
$result = mysql_query($my_query) or die(mysql_error());
while($row = mysql_fetch_array($result,$con))
echo $row['title'];
mysql_close($con);
?>
zcj125 0 Newbie Poster
zcj125 0 Newbie Poster
zcj125 0 Newbie Poster
rpv_sen 59 Junior Poster
simplypixie 123 Posting Pro in Training
zcj125 0 Newbie Poster
rpv_sen 59 Junior Poster
simplypixie 123 Posting Pro in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.