Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bigandy

macrumors G3
Original poster
Apr 30, 2004
8,852
7
Murka
I can't figure out why everytime i run an action on this fracking website (like adding a favourite to a certain table), it insists on redirecting to the location i want, but it keeps sending the parameters everywhere, like

favourites.php?action=add&item=thatone

even if i get it to go to frack.php, it still sends the question mark and the bits after.

anyone got a quick idea how to stop PHP from forwarding these parameters after running a script?

yeah, i admit it, i'm doing it in Dreamweaver. it's redirect code is

PHP:
$insertGoTo = "/favourites/";

and

PHP:
header(sprintf("Location: %s", $insertGoTo));
 
The problem is that you're using a GET function instead of a POST function. If you switch the code to POST, it won't show the parameters in the URL.

The bigger problem though seems to be that you don't know PHP. It's not something you can usually just let Dreamweaver do for you. I'd recommend going to php.net and looking over some of their tutorials, or the other tutorials sites listed in the thread at the top of this forum.

jW
 
The problem is that you're using a GET function instead of a POST function. If you switch the code to POST, it won't show the parameters in the URL.

The bigger problem though seems to be that you don't know PHP. It's not something you can usually just let Dreamweaver do for you. I'd recommend going to php.net and looking over some of their tutorials, or the other tutorials sites listed in the thread at the top of this forum.

jW

I knew it was something this simple, as I've learnt and done it before.

I also feel a little insulted by your 'assumption' that I don't know PHP, after I illustrated a minor problem, wishing a quick hand with it.

Assumptions is something people shouldn't really make on minor questions like this, as they can often end up completely in the wrong. What if, for example, the person you're 'assuming' at just forgot? What if, the OP suffers from short term memory loss, which makes remembering smaller parts of PHP bloody difficult?

I'm sorry if this insults you, but 'helpfully pointing out' that someone doesn't know something is not the place of people on this forum. It's all about helping each other.

[/rant]

And just to make it clear - thanks for pointing out the solution to my issue.
 
:rolleyes: Right, because your original post didn't indicate that you didn't know PHP at all. :rolleyes:

Dude, sorry if you really do know more than your post made it sound, but you kinda implied that you were just letting Dreamweaver do all the coding, which is generally a very bad idea.

jW
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.