Jump to content

Just a quick question php-HTML


Pallchrn2

Recommended Posts

I need to use a HTML  form to retrieve data in a certain order of ascending/descending using a drop down box and a true/false statement button for one of the values from a MySQL database. Im guessing I need a php script to query the database, but can I add the php code to the HTML or upload a php to the server that links the HTML thank you

 

Link to comment
https://forums.phpfreaks.com/topic/261402-just-a-quick-question-php-html/
Share on other sites

To redirect:

header("Location: http://www.example.com/");

Make sure it's before any output to the browser.

 

A common looking form:

<form action="" method="post">
<input type="text" name="sometext" />
<input type="submit" name="submit" value="submit" />
</form>

The action parameter in the form decides what page the user will visit and send the post data to when they hit the submit button.

 

To access the post data:

if(is_set($_POST['sometext'])){
echo $_POST['sometext'];
}

 

What you need help with is a bit unclear, so I hope this helps you.

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.