i say skip the tutorials , they arent always good, go learn php from w3schools and tizag, and some of PHP freaks tutorials, and you will be coding in no time.
Yer i mean make your own for everything , e.g. instead of mysql die statements use a custom message , etc. I know i some hosts stop errors, but if they do you should probs contact them or change host.
I think now days js is more common on sites, and should be starting to be made compulsary. As there is web 3.0 (or something) upcoming and stuff like that. So i think Javascript should begin to be forced on users. But i wouldnt fully rely on it yet.
Some times i use something similar to fears, but just use a var instead of an array , and just echo it , also check if the var is present and if it is , dont run the query.
One way i do it
<?php
if(isset($_POST['submit']))
{
$username = $_POST['username'];
$password = $_POST['password'];
if (empty($username))
{
echo "You must enter a username";
}
elseif (empty($password))
{
echo "You must enter a password";
}
else
{
echo "You are logged in";
}
}
?>
<form method="post" action="">
<table>
<tr>
<td>Username:</td>
<td><input name="username" type="text"></td>
</tr>
<tr>
<td>Password:</td>
<td><input name="password" type="password"></td>
</tr>
<tr>
<td><input name="submit" type="submit" value="submit"></td>
</tr>
</table>
</form>
I think this will work
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.