hi need a very big help..and im a newbie in this field
im keep getting the same error "Parse error: syntax error, unexpected 'button' (T_STRING), expecting ',' or ';' "

here the code :

<!--FORM-->

            <form method="POST" action="BookingnDisplay_Process.php"><!--link to DB-->
            <br>
            <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>


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

            <!--<label>Matric ID
            <span class="small">Add a matric ID</span>
            </label>
            <input type="text" name="matric_id" id="matricID" />-->

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

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

            <label>Time From
            <span class="small">Insert time (ex : 08:00 AM)</span>
            </label>
            <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>
            </label>
            <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/ />

            <label>Studio
            <span class="small">Choose studio</span>
            </label>
            <select name = "studio" required >
                    <option>Jamming</option>
                    <option>Dancing</option>
                    <option>Singing</option>
            </select>
            <br>     
            <br>
            <button type="submit">Submit</button> 
            <br>


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

            <!--<center><input  class = "button" type="submit" name="submit" value="Submit"></center>-->
            <div class="spacer"></div>


            </form>

                </div>

        <!--FORM-->


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


        <!--Display User Booked-->
        <?php
            include("dbase.php");

            $query = "SELECT * FROM studio";
            $result = mysql_query($query, $conn);
            $num=mysql_numrows($result);
            mysql_close();

            echo" <b>
            <center> User Booked</center>
            </b>
            <br>
            <br>";

            $i=0;while ($i < $num) 
            {
            $id=mysql_result($result,$i,"id");
            $name=mysql_result($result,$i,"name");
            $phone=mysql_result($result,$i,"phone");
            $date=mysql_result($result,$i,"date");
            $time_from=mysql_result($result,$i,"time_from");
            $time_till=mysql_result($result,$i,"time_till");
            $studio=mysql_result($result,$i,"studio");
            echo
            "<table border>
                <tr>
                    <td>
                        NAME
                    </td>
                    <td >
                        PHONE NO.
                    </td>
                    <td>
                        DATE
                    </td>
                    <td>
                        TIME FROM
                    </td>
                    <td>
                        TIME TILL
                    </td>
                    <td>
                        STUDIO
                    </td>
                    <td>
                        ACTION
                    </td>
                </tr>

                 <tr>
                    <td >
                        $name
                    </td>
                    <td>
                        $phone
                    </td>
                    <td>
                        $date
                    </td>
                     <td>
                        $time_from 
                    </td>
                    <td>
                        $time_till
                    </td>
                    <td>
                        $studio
                    </td>
                    <td>
THE ERROR IS RIGHT HERE---->
<button type="button"window.location = "BookingnDisplay.php";>DELETE BOOK</button>

                    </td>

            </table>"
            ,$i++;}
            ?>

The problem is that you opened the quote on line 98 and closed it on line 144 with <button type="

If you need to include quotes within quotes, one option is to use single quotes instead.

For example.. echo "<button type='button' .... </button>";

you can also escape your quotes.. Do this with a backslash. To escape a quote just place a backslash directly before the quotation mark, for example... echo "<button type=\"button\" .... </button>";

Additionally, your call to window.location won't work without the event handler.

<button type='button' onClick=\"window.location = 'BookingnDisplay.php'\">DELETE BOOK</button>
                        </td>
                </table>";
                $i++;
                }

And like JorgeM said, you need to escape the double qoutes

Thank you so much !! its work !!

Glad your problem was solved.

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.