i want to insert new data but the data didnt show up in database and didnt display for user
when i click foe change theres nothing happend
i couldnt find any error...ples help me


Welcome <?php echo $_SESSION["name"]; ?>. Click here to <a href="logout.php" tite="Logout">Logout</a>.

<div id="stylized" class="myform">

            <form method="POST" action="BookingnDisplay_Process.php"><!--link to DB-->
            <h1><center>TALENT STUDIO Booking form</center></h1>
            <u><strong>Please read carefully.</strong></u></p>
            <p><strong>1. If in 15 minutes the user did come to claim the place, it will be
                  open to other walk-in user.</strong></p>

            <span class="small">Add your name</span>
            <input type="text" name="name" id="name" required />

            <span class="small">Add your phone number</span>
            <input type="text" name="phone" id="phone" maxlength=
            "20" size="20" required />

            <span class="small">Pick a date</span>
            <input type="date" name="date" required />

            <label>Time From
            <span class="small">Insert time (ex : 08:00 AM)</span>
            <input type="time" name="time_from" placeholder="hrs:mins" pattern="^([0-1]?[0-9]|2[0-4]):([0-0][0-0])(:[0-5][0-9])?$" class="inputs time" required/ />

            <label>Time Till
            <span class="small">Insert time (ex : 10:00 AM)</span>
            <input type="time" name="time_till" placeholder="hrs:mins" 
            pattern="^([0-1]?[0-9]|2[0-4]):([0-0][0-0])(:[0-5][0-9])?$" class="inputs time" required/ />

            <span class="small">Choose studio</span>
            <select name = "studio" required >
            <button type="submit">Submit</button> 

            <button type="reset">Clear</button>   

            <div class="spacer"></div>




        <div id="stylized" class="myform">
        <div id="display">

        <!--display user booked-->



$query = "SELECT * FROM studio WHERE email1 = '".$_SESSION["email"]."';";
$result = mysql_query($query, $conn);

$row = mysql_fetch_array($result);

    $name = $row["name"];
    $phone = $row["phone"];
    $date = $row["date"];
    $time_from = $row["time_from"];
    $time_till = $row["time_till"];
    $studio = $row["studio"];


Name: <?php echo $name; ?><br>
Phone No.: <?php echo $phone; ?><br>
<strong>Date: <?php echo $date; ?><br></strong>
<strong>Time from: <?php echo $time_from; ?><br></strong>
<strong>Time till: <?php echo $time_till; ?><br> </strong>
<strong>Studio: <?php echo $studio; ?><br></strong>
Action : <strong><a href="changeBookUser.php?id=<?php echo id; ?>">Change</a>
</strong>/<strong><a href="deleteBookingUser.php?id=<?php echo $id; ?>">Delete</a></strong>



<!-- To insert data of BookingnDisplay.php into database. -->



    //get details

    extract( $_POST );

$name = mysql_real_escape_string ($_POST['name']);
$phone =  mysql_real_escape_string ($_POST['phone']);
$date = mysql_real_escape_string ($_POST['date']);
$time_from = mysql_real_escape_string ($_POST['time_from']);
$time_till = mysql_real_escape_string ($_POST['time_till']);
$studio = mysql_real_escape_string($_POST['studio']);

$query = "UPDATE studio SET  

WHERE email1 = '".$_SESSION["email"]."';";

$result = mysql_query($query,$conn) or die("Could not execute query in isistdkanBooking.php");

if($result) {
    header("Location: BookingnDisplay.php");



Hi if your gonna insert new data in the db why are you using UPDATE query?

you need to use INSERT query like

$query= "INSERT INTO studio(name,phone,`date`,time_from,time_till,studio) VALUES ('$name','$phone','$date','$time_from','$time_till','$studio')";

also mysql_real_escape_string is already deprecated refer to this link and you better use mysqli or pdo for the same reason

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.