Jump to content

What is wrong with this


bloodling

Recommended Posts

For the life of me i can not get this to work.

Can someone please have a look at it.

 

It is like 118 in notpad++

See the attachment for the entire .php document.

 

 

 

if(empty($err)) {

 

$sql_insert = "INSERT into `users`

  (`first_name`,`user_email`,`pwd`,`last_name`,`website`,`date`,`users_ip`,`activation_code`,`country`,`user_name`

)

    VALUES

    ('$data[first_name]','$usr_email','$sha1pass','$data[last_name]','$data[web]'

,now(),'$user_ip','$activ_code','$data[country]','$user_name'

)

";

// THERE IS SOMETHING WRONG WITH THIS LINE I THINK IT IS LINE 118 NOTEPAD++

mysql_query($sql_insert,$link) or die("Insertion Failed:" . mysql_error());

 

$user_id = mysql_insert_id($link); 

$md5_id = md5($user_id);

mysql_query("update users set md5_id='$md5_id' where id='$user_id'");

// echo "<h3>Thank You</h3> We received your submission.";

 

 

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

before you make us read through 118 lines of code, what are the errors you're getting (and on what line numbers)?

 

this is wrong:

 

VALUES ('$data[first_name]','$usr_email','$sha1pass','$data[last_name]','$data[web]',now(),'$user_ip','$activ_code','$data[country]','$user_name')";

 

try echo(ing) out those variables beforehand, and you'll soon find the problem.

Link to comment
Share on other sites

No sorry, i still cant get it to work. I have 1 year of html, php, sql under my belt.

 

I got an attachment with all the .php scripts  " I edited out my details"

 

I have spent about 3-5 hours on this one problem so if you could give me a bit of advise or a resolution i would much appreciate it. Thank you in advance.

 

[attachment deleted by admin]

Link to comment
Share on other sites

:psychic: What's the error/issue - what's it not doing that you think it should? what's it doing that you think it shouldnt? :psychic:

 

When you echoed out the sting as WebStyles suggested what did you get?  Did you echo out the $sql_insert variable?

// THERE IS SOMETHING WRONG WITH THIS LINE I THINK IT IS LINE 118 NOTEPAD++     
echo $sql_insert;
exit();

could you post what you get when you echo that?

Link to comment
Share on other sites

I have just built a temporary website for this error  http://shift.site40.net/main/login2/

the .zip file has the source code in it " i have edited my user information in it"

 

The error is on    http://shift.site40.net/main/login2/register.php

 

      Just enter fake information and press register and you will get the error.

 

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/a4541804/public_html/main/login2/register.php on line 118

 

 

 

I still have not figured out the error.

Link to comment
Share on other sites

shift.site40.net Is ONE of my testing accounts so I will give you the user and pass,

 

WebStyles could you take a look please

 

host URL:    www.000webhost.com

user:          tm9332@gmail.com

pass:          dacutie4124

 

oh and i don't use this email or password for anything else.

 

Link to comment
Share on other sites

Has it got something to do with line 35,36 of dbc.php ? I commented them out for some reason i cant remember now.

There is nothing new in the database.

 

 

Arr i remember what i was doing now and i think it should work now

 

 

// line 35,36 of dbc.php

$link = mysql_connect("mysql3.000webhost.com", "a4541804_un", "itsgallus4124") or die("Couldn't make connection.");

$db = mysql_select_db("a4541804_dn", $link) or die("Couldn't select database");

 

 

oops oh and that password i posted was wrong "but it was right in the code" lol

well ill just be copying the files over to another host and IT WORKS thank you for all your help guys.

Drinks on me!

Link to comment
Share on other sites

For people who got stuck on this  probable or just want a php login script with email validation bla, bla, bla the license said that it was free no strings attached.

 

It will still have all the settings completely unmodified from the time we got it working the link in below.

 

http://shift.site40.net/main/login2/login2.zip

 

 

Well i am going to go to bed before my typing goes down the drain.

 

Thx Again.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.