MySQL: Specifying connection parameters

This entry is part 5 of 26 in the series Learn MySQL

If you would like to fix the connection to only one user, you can update a plain text file my.ini.

If you use WAMP, the file my.ini is located in C:\wamp\bin\mysql\mysql5.6.12.

I have edited mine to:


host = localhost

user = dbuser

password = dbuser

Now if you type mysql in the command line, you will be login as dbuser.

PHP: Using hidden parameters to test for form submission

This entry is part 40 of 54 in the series PHP Tutorial

Another technique for testing form submission is to use hidden parameters. If the hidden parameter is in $_POST , then we process the form.

<input type='hidden' name='submit_check' value='1'>

The hidden parameter is shown in line 25 and there is a type=’hidden’ in the parameter.


// Logic to do the right thing based on
// the hidden _submit_check parameter
if ($_POST['submit_check']) {
} else {

// Do something when the form is submitted
function process_form()
    print 'Hello, ' . $_POST['my_name'];

// Display the form
function show_form()
    print<<< html_output
<form method='POST' action='$_SERVER[PHP_SELF]'>
Your name: <input type='text' name='my_name'>
<input type='submit' value='Say Hello'>
<input type='hidden' name='submit_check' value='1'>