Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Best Dreamweaver Php Login Tutorial?
Old 07-18-2010, 11:24 AM Best Dreamweaver Php Login Tutorial?
maximusminds's Avatar
Experienced Talker

Posts: 44
Name: ernie
Location: USA
Trades: 0
Does anyone know of a great tutorial about how to make a login page in dreamweaver using phpmyadmin? There are alot on youtube but I'm sure some to most of them aren't great. Anyone have any suggestions?
maximusminds is offline
Reply With Quote
View Public Profile Visit maximusminds's homepage!
 
 
Register now for full access!
Old 07-19-2010, 02:05 AM Re: Best Dreamweaver Php Login Tutorial?
Experienced Talker

Posts: 41
Trades: 0
Hi, I don't know that you are the new in with PHP, but if you new in that then you first clear all basic concept about that language,
Client side scripting language [HTML,CSS,JAVA - SCRIPT]
Server side scripting language [PHP].

Because according to my personal exp. you will become a good developer, when you clear all basic concept that's help you for creating any web-development,

Now I share My Code that's Definitely Help you.

File save path: C/D/E/F: Drive => wamp => www => login folder(You Create) => index_dir.php
Database Name we used:dir_db
Table Name we used :dir_login(With Two Attribute, username, password)

Code:

<?php
if(isset($_POST['posted']))
{
$name=$_POST['dir_username'];
$pass=$_POST['dir_password'];
$connect=mysql_connect('localhost','root','');
$db=mysql_select_db('dir_db',$connect);
$query=mysql_query('SELECT * FROM dir_login',$connect);
while($row=mysql_fetch_array($query))
{
$column1=$row['username'];
$column2=$row['password'];
if($column1 == $name && $column2 == $pass)
{
header('location:registration_dir.php');
}
else
{
echo('Sorry Username and password is mismatch');
exit();
}
}
}

?>

<form name="index_dir" method="post" action="index_dir.php">
<table align="center" border="">
<tr>
<td>
<b style="background-color:#063">USERNAME</b>
<input type="text" name="dir_username" value="USERNAME" style="background-color:#966">
</td>
</tr>
<tr>
<td><b style="background-color:#063">PASSWORD</b>
<input type="password" name="dir_password" value="*****" style="background-color:#966">
</td>
</tr>
<tr>
<td><input type="hidden" name="posted" value="true>"></td>
<td>
<input type="submit" name="dir_submir" value="GO" style="background-color:#063">
</td>
</tr>
</table>
</form>

Technology use:
Server: localhost
Database System: MySql[phpmyadmin client].
Editor: Adobe Dream Weaver.

and still you have doubt then either mention here or visit w3schools.com.

__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
.

Last edited by sandeep Kumar; 07-19-2010 at 02:06 AM..
sandeep Kumar is offline
Reply With Quote
View Public Profile Visit sandeep Kumar's homepage!
 
Old 07-19-2010, 02:52 AM Re: Best Dreamweaver Php Login Tutorial?
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Quote:
Originally Posted by sandeep Kumar View Post
Now I share My Code that's Definitely Help you.
As I pointed out the last time you posted this code (http://www.webmaster-talk.com/php-fo...g-a-login.html):
Quote:
Did you try it?

Just looking at it I see a couple things wrong. The query as it is will pull every row from the table, which is a waste.

Next it looks like you're attempting to cycle through every record, searching for the correct username / password combination, but since you call exit in the case that the username and password don't match it will only work if the correct record is the first one returned.

You could fix this by adding "WHERE username = '$name'" to the query, but then you'd have to account for sql injections.
Also, you should start using php tags when posting code.

Regarding the OP:
I don't know of any tutorials specifically for dreamweaver and phpmyadmin, but I recommend avoiding those tools all together. Any code generated by dreamweaver probably isn't very great, and if you are just getting started you should learn how to code from scratch anyways (to clarify, I don't think there's anything wrong with using it to write code, so long as you are the one writing it). phpmyadmin can be useful but I find that I work much faster just using console.

You'll probably have better luck if you just search for a general tutorial rather than one specific to phpmyadmin and dreamweaver.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by NullPointer; 07-19-2010 at 02:58 AM..
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Reply     « Reply to Best Dreamweaver Php Login Tutorial?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.12766 seconds with 12 queries