Jump to content

Basic PHP Forms

Featured Replies

Could someone please explain to me what this will php code will actually do with a brief description of each value/attribute?

 

Is it essentially creating a form with a place to enter a name and a choice of choosing module 1 or module 2? What do the method = post and action = link do exactly?

 

Any help appreciated.

 

<form id ="test" name = "test" method = "post"

action = "http://www.ipa.ie/test.php">

 

</form>

 

<label for = "name">Enter name</label>

<input type = "text" name = "name"id = "name"/>

 

<label>

<input type -"radio" name = "modules" value = "1"

id = "modules_0"/>

web</label>

</br>

 

<label>

<input type = "radio"name = "modules" value = "2"

id = "modules_1"/>

hardware</label>

That's not PHP code; it's HTML.

 

method="post" describes how the information in the form will be sent to the server. You can see details here:

 

https://en.wikipedia.org/wiki/POST_%28HTTP%29

 

action="" tells the browser where to submit the form contents. When you press the submit button, the browser makes an HTTP request to the link provided in action= containing the form data.

Archived

This topic is now archived and is closed to further replies.

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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.