Jump to content

need help with some PHP-generated form actions


michaelll

Recommended Posts

Ok, so I currently have this http://pastebin.com/cCgyavs0 snippet that generates links to the previous, next and last page based on the current page (GET variable) or the total item count in the MySQL DB to then use forms as links by inserting the URLs into the action attribute. I did this cause I don't wanna use images as links, btw :P

 

It kinda works - I get links like:

 

shop.php?page=1

shop.php?page=12

shop.php?page=14

shop.php?page=225

 

When I'm on page 13 of 225 for example.

 

Though when I click one of the buttons, I always get redirected to "shop.php?".

 

:/

<div id="pagenav">
	<div class="pagenavwrapper">
		<form action="shop.php?page=1">
			<input type="submit" value="" id="first">
		</form>

		<form action="shop.php?page=11">
			<input type="submit" value="" id="prev">
		</form>

		<span class="textInPageNav">
			 Seite 12/225 
		</span>

		<form action="shop.php?page=13">
			<input type="submit" value="" id="next">
		</form>

		<form action="shop.php?page=225">
			<input type="submit" value="" id="last">
		</form>

	</div>
	</div>

 

that's the code being put out

 

screenshot of the website, btw:

 

http://dl.dropbox.com/u/2499075/Screenshots/webshop.png

 

EDIT: dont ask me btw, why I can do that webshop but am not able to generate simple links :P

Cause I dont get it either.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.