June 14th, 2008 / No Comments » / by Panzer
The RSS feed has been fixed and the theme is just about done! Its a very simple theme (as CSS/graphics have never been my strong point) but it will look good. More jQuery, PHP and Linux content coming soon!
Posted in: news, query7
May 27th, 2008 / 1 Comment » / by Panzer
Im in the process of making/designing a custom wordpress theme for the site. Alot of things went wrong in the upgrade from 2.5 to 2.5.1 so once the new theme is finished, im doing a fresh install of wordpress so it (hopefully) irons out the RSS and posting bugs. Im backing up the database (and ill restore it) so all of the posts will still be where they were.
More posts are coming, ive been working on a couple of video tutorials lately so i can post them with the launch of the new site/theme.
Just letting everyone know.
~Panzer
Posted in: news, query7
May 13th, 2008 / 2 Comments » / by Panzer
Heres Part 2 of the jQuery AJAX login tutorial. If you haven’t already, i suggest you read part 1 located here.
We are going to start writing the PHP code to process the form. This is fairly basic stuff, using $_POST to get the values from the form, then checking them against pre-assigned values, if they match, then echo approved, if they don’t then echo denied.
-
<?php
-
-
if($_POST[’submit’]){
-
-
-
$username = $_POST[‘username’];
-
$password = $_POST[‘password’];
-
-
// Here you would put your validation, checking existing database records.
-
-
if($username == panzer && $password == query7){
-
-
-
-
//Insert your cookie setting code here
-
-
} else {
-
-
-
-
}
-
-
} else {
-
-
echo "Form not submitted";
-
-
}
-
?>
So at the end of this stage, you will have an HTML form set up and this PHP file. You can enter the username Panzer and the password of query7 into the form and it will return Logged in.
Next tutorial, the fun part, the AJAX!
Posted in: Uncategorized, ajax, code, jquery, php, tutorial
Tags: jquery, php, tutorial
May 10th, 2008 / 2 Comments » / by Panzer
Heyo. This is going to be the first of 4 tutorials on making a jQuery powered AJAX login system with a PHP backend. The series of tutorials will go like so.
- Plan, code the form (This tutorial)
- Code the PHP backend, make it work
- Code the AJAX, implement it.
- Tidy it up, make it look snazzy
Ok then. So we will have a forum with 2 inputs; username and password. The user will enter the details and we’ll use PHP to authenticate them. If its true, we can set a cookie or echo some text. We will then implement jQuery’s AJAX and make the whole thing seemless. Some nice little fades will be added at the end.
So, the form. Its a plain and simple HTML form. Nothing special about it.
-
<form method="post">
-
-
<b>Username:</b><input type="text" name="username">
-
-
<b>Password:</b><input type="password" name="password">
-
-
-
<input type="submit" name="login" value="Login">
-
</form>
Thats all for now. Next lesson we will code the PHP and “make it work“.
Posted in: ajax, jquery, php, tutorial
Tags: ajax, jquery, php, tutorial
May 9th, 2008 / No Comments » / by Panzer
Hey guys, just thought i’d post a little interim post (as such). Im in the process of making a 4 part tutorial series on using jQuery’s AJAX. Its a “case study” where i/we will make a basic login form with a PHP backend and then use jQuery to make the login seemless. Eg. you put your username/password in the form and click the login button the page doesn’t reload but it will tell you whether its the correct user/pass , in which case a cookie is set, or if its bad info.
It might take a little while to finish up so i might not be posting much over the next week (sorry) but it will be worth it in the end.
Posted in: query7