jwk811 Posted November 16, 2006 Share Posted November 16, 2006 i had a link that would add a variable to the url once clicked on.. it would look like this:<a href="index.php?action=1">Click Here</a>But when someone clicks on it, it doesnt add that action=1 part to the url.. why not? is there some other way to do this or what?thanks for the help! Link to comment https://forums.phpfreaks.com/topic/27501-adding-variables-into-url-like-indexphpaction1/ Share on other sites More sharing options...
Caesar Posted November 16, 2006 Share Posted November 16, 2006 You would have to display your code to know why it isn't triggering anything.Edit:[quote]<a href="index.php?action=1">Click Here[/url][/quote]That is wrong. It need to be either:[code]<a href="index.php?action=1">Click Here</a>[/code] or [code][url=http://index.php?action=1]Click Here[/url][/code] if you are using something with BBCode type tags. Link to comment https://forums.phpfreaks.com/topic/27501-adding-variables-into-url-like-indexphpaction1/#findComment-125753 Share on other sites More sharing options...
Procode Posted November 16, 2006 Share Posted November 16, 2006 If you are using html then it should be[code]<a href="?action=1">Click here</a>[/code]Try that, works for me. Link to comment https://forums.phpfreaks.com/topic/27501-adding-variables-into-url-like-indexphpaction1/#findComment-125754 Share on other sites More sharing options...
jwk811 Posted November 16, 2006 Author Share Posted November 16, 2006 oh thats right.. im actually using a button for this which looks like this:<form method="link" action="index.php?action=register"><input type="submit" value="Click Here"></form>the other link worked when i tried it but im trying to do this.. can you try to see if this works for you? thanks! Link to comment https://forums.phpfreaks.com/topic/27501-adding-variables-into-url-like-indexphpaction1/#findComment-125756 Share on other sites More sharing options...
Caesar Posted November 16, 2006 Share Posted November 16, 2006 That can work...if your code on the destination file is written to work with that in mind, rather than a value passed via the url. Link to comment https://forums.phpfreaks.com/topic/27501-adding-variables-into-url-like-indexphpaction1/#findComment-125761 Share on other sites More sharing options...
trq Posted November 16, 2006 Share Posted November 16, 2006 There is no such method as [i]link[/i]. By default a form is sent via get, if stated otherwise, post. Link to comment https://forums.phpfreaks.com/topic/27501-adding-variables-into-url-like-indexphpaction1/#findComment-125766 Share on other sites More sharing options...
jwk811 Posted November 17, 2006 Author Share Posted November 17, 2006 post did it thanks Link to comment https://forums.phpfreaks.com/topic/27501-adding-variables-into-url-like-indexphpaction1/#findComment-125874 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.