Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.