Results 1 to 2 of 2

Thread: [RESOLVED] php advice in getting an sql query using a submit button

  1. #1
    Hyperactive Member louvelle's Avatar
    Join Date
    Jun 08
    Posts
    464

    Resolved [RESOLVED] php advice in getting an sql query using a submit button

    Hi guys.

    I'm creating a simple add to cart database function and I'm currently stuck half way through. I have a couple of images that is shown on a table, a pagination style. Beneath the images are buttons that are automatically created.

    Like this:

    Code:
    <div class="thumb">
    	<img src=' . $photoID . ' border="0" />Name: '.$photoName.'<br /> Price: '.$price.'
    		<form method="post" action="showreserve.php">
    			<input type=\'submit\' value=Reserve name='.$photoName.' />
    		</form>
    </div>
    The reason why there are submit buttons beneath the images is because once the submit button is clicked, that item will be inputted in the database depending on which button is clicked. I'm still a noob in php and I'm having some problem how to figure out a way to let the browser know which has been click in order to change my sql variable $imagename in "INSERT INTO tblreserve VALUES($imagename)" and execute it on another page.

    I hope you get what I'm trying to do. Feel free to ask anything about my problem if something is unclear to you guys.

    Thanks.

    Manny Pacquiao once posted in his twitter:
    It doesn't matter if the grammar is wrong, what matter is that you get the message

  2. #2
    Hyperactive Member louvelle's Avatar
    Join Date
    Jun 08
    Posts
    464

    Re: php advice in getting an sql query using a submit button

    Thread is solved. The solution that I found is on the link below.
    http://www.vbforums.com/showthread.p...&is_resolved=1

    Manny Pacquiao once posted in his twitter:
    It doesn't matter if the grammar is wrong, what matter is that you get the message

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •