Solved

Can this be done?

Posted on 2013-05-17
1
263 Views
Last Modified: 2013-05-17
Here's my code:

<table align="center" border="0">
	<tr>
	<td>
	previous
	</td>
	<td>
	<A HREF="inventory_display.php?Edit=Yes&id=<?php echo $previous_id; ?>"><IMG SRC="images/previous_arrow.jpg" border="0"></a>
	</td>
	<td class="top_header"><input type="hidden" name="id" value="<?php echo $bruce_row['id']; ?>">
	<input type="submit" value="submit">
	</td>
	<td>
	<input type="image" name="submit_next" src="images/next_arrow.jpg" value="Y">
	</td>
	<td>
	next
	</td>
	</tr>
	</table></form>

Open in new window


I want to create a dynamic where when the user hits "next," the form info is submitted and the user is routed to the next product in the database. I also want the option to exist to simply click "submit" and not be routed to the next product.

What you see above is my two "submit" options. One has a hidden field that I'm wanting to be recognized as my code's "cue" to run the script and then forward the user to the next product.

It's not working. Here's what I'm attempting to do to "field" the hidden value associated with the "next" image:

if(isset($_POST['submit_next'])&&$_POST['submit_nex']=="Y")
{
echo "yes";
}

Open in new window


Regardless if I hit the "submit" button or the "next" button, I can never get "yes" to show up.

What am I missing?
0
Comment
Question by:brucegust
1 Comment
 
LVL 18

Accepted Solution

by:
Jerry Miller earned 500 total points
ID: 39175471
You have a typo in the second part, that may be your issue. It is never seeing the value in 'submit_nex'.

&&$_POST['submit_nex']=="Y")
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help in good tutorials for PHP, HTML and CSS 6 40
What's wrong with this PDO query? 5 27
Angular won't showing my array result in HTML 3 24
html border input line 7 13
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question