Jump to content

Does anybody know how to auto-submit a form in PHP without Javascript?


medaswho

Recommended Posts

i am trying to build a forum.  i would like for the main page to do some kind of loop in which it would build a list of posting titles

exampleecho"<a href='whatever.php'>".$title."</a>";

then to submit the form without a button, just send the value of $title[/] in a post to the next part of the app?

can anyone help?

You will need to pass it through the address bar and use $_GET to draw it into the page.

<?php
for ($x = 0; $x < 10; $x++)
     echo "<a href='whatever.php?title=$title[$x]'>$title[$x]</a>";
?>

 

Then on the whatever.php page, you can use:

<?php
$title = $_GET['title'];
echo $title; // Current title.
?>

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.