PHPSuperBlog.com

HTML form – submit to a new window

We use HTML form a lot for the user to input data and process those data from a PHP file, but with the standard code of a HTML form:

<form method="post" name="bus" action="afile.php">
<input type="text" name="atext" />
<input type="submit" value="submit"/>
</form>

Continue Reading →

Check ip address of host or website with PHP function and HTML form

There is a function in PHP to check the IP address of a host. It is called “gethostbyname()“. We could use it to check the IP address of a website. All you have to do is to type in the website address into the function, for example: gethostbyname(www.phpsuperblog.com); and print the result out and then you can see the IP address of www.phpsuperblog.com. To make it more interactive, I have created an example with HTML form which allows the user to input the website for checking the IP address and here it is: Continue Reading →

Create a HTML form with PHP for loop and table

To create a HTML form with just a few text fields and other HTML form elements is easy, but sometimes in a stock control system or price input system for example, there might be a need for many text fields and other different HTML form elements repeatedly appear in the HTML form and they might be more than 100. To type in the codes of all of them will take too much time. Therefore a PHP for loop and a table is good for this task. Continue Reading →

Empty a table in MySQL database with HTML form and PHP

Sometimes you might like to empty a table in the MySQL database. Instead of deleting every record in the MySQL database, you could run a query “truncate table ‘tablename’” to do the job. involving a HTML form is a good idea for the user. Continue Reading →

  • Categories

  • Useful Downloads