MrAdam Posted June 25, 2007 Share Posted June 25, 2007 I don't think I've ever ready anything about this before, but I was wondering, is it possible to send post variables to a webpage, without using a form?So like you could click a link (I assume javascript would take over) load the page and send post variables for you to retreive on that page...hope im making sense.. anyone have any ideas?- cheers ! Link to comment Share on other sites More sharing options...
-Mike- Posted June 25, 2007 Share Posted June 25, 2007 The only way browsers can perform a POST is from a form. Try using session variables if you want to pass information from page to page without any chance of the user changing it. Link to comment Share on other sites More sharing options...
Mr_CHISOL Posted June 25, 2007 Share Posted June 25, 2007 The only way browsers can perform a POST is from a form. Try using session variables if you want to pass information from page to page without any chance of the user changing it.That's not completely true. Apparentely you never heard of AJAX!?AJAX Can be used to send (as GET or POST) and recive data without reloading the pageTake a look what you can find using google: http://www.google.se/search?q=AJAX+POST&am...lient=firefox-a Link to comment Share on other sites More sharing options...
MrAdam Posted June 25, 2007 Author Share Posted June 25, 2007 thing is i actually want to reload the page, guess a form will have to do ! cheers! Link to comment Share on other sites More sharing options...
Mr_CHISOL Posted June 25, 2007 Share Posted June 25, 2007 May I ask why don't you want to use a form??You are still able to submit the form without using a submitbutton (using JavaScript) or visible fields... Link to comment Share on other sites More sharing options...
Guest madhu Posted June 26, 2007 Share Posted June 26, 2007 Hi,I will give u answer for ur question. sending post variables with a link or button u can get the answer by using anchor tag . I will give u one example. category and subcategory two things are there. at present we are in category.php you want to go to the subcategory and also post variables from category to subcategory.By Using this Link<a href="subcategory.php?key=education">education</a>by using button<input type='submit' onclick="subcategory.php?key=education" value='submit'>if u are getting the values from database then u will use this.<a href='subcategory.php?key=<? $row[category] ?>' > </a> and u can get values in subcategory.php$category=$_GET['key'];Hope u can solve ur problem. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 26, 2007 Share Posted June 26, 2007 That's not using $_POST, that uses $_GET. He specified that he wanted to send the data through post, except without using a form. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.