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
trying to insert a MD5'ed variable into a MYSQL table but cant
Old 01-12-2010, 07:57 AM trying to insert a MD5'ed variable into a MYSQL table but cant
Webmaster Talker

Posts: 611
Trades: 0
hi, my script is supposed to insert the word "password" as an MD5'ed string into my table. but it doesnt . here is my code, any help GREATLY appreciated as ive been working on this for a few hours. LOL. thank you. derek

Code:
<?php

include("connect1.php");


$1a = "password";
$1a = md5($1a);
 



 mysql_query("INSERT INTO members (Email, Password)
 VALUES ('user@yahoo.com','$1a')");
 

 if(mysql_error())
    {
    echo "Error: " . mysql_error();
    }
else
    {
    echo "Worked fine";
    }

?>

Last edited by silverglade; 01-12-2010 at 08:07 AM..
silverglade is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-12-2010, 07:59 AM Re: trying to insert a MD5'ed variable into a MYSQL table but cant
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
PHP Code:
$la md5("password"); 
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 01-12-2010, 08:21 AM Re: trying to insert a MD5'ed variable into a MYSQL table but cant
Webmaster Talker

Posts: 611
Trades: 0
AWESOME i also changed the variable name and i got it to work1! MUAHAHAHA. thank you so much!!! derek
silverglade is offline
Reply With Quote
View Public Profile
 
Old 01-12-2010, 09:27 AM Re: trying to insert a MD5'ed variable into a MYSQL table but cant
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
Yeah, vars are not allowed to begin with a number.
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 01-12-2010, 05:01 PM Re: trying to insert a MD5'ed variable into a MYSQL table but cant
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
Quote:
Originally Posted by mgraphic View Post
Yeah, vars are not allowed to begin with a number.
Aha, did it say 1a as in "one a"? I wrote la as in "LA"
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Reply     « Reply to trying to insert a MD5'ed variable into a MYSQL table but cant
 

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.24377 seconds with 12 queries