This topic is locked
[SOLVED]

 Userregistration

5/14/2010 4:17:00 PM
PHPRunner General questions
C
cis2131 author

I want to insert some deafult values on a user, at registration.
I have tried this:



global $conn;

$strSQLInsert = "insert into customers (urllimit, domlimit, keylimit) values (10, 10, 10) where email='".$userdata["email"]."'";

db_exec($strSQLInsert,$conn);


Email is the username.
I get this error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where email='ch@mail.dk'' at line 1
Can anybody tell me what i am doing wrong?..

Sergey Kornilov admin 5/14/2010

Your SQL Query is incorrect. I recommend to check this article that explains the basics of INSERT SQL query:

http://www.webcheatsheet.com/sql/interactive_sql_tutorial/sql_insert.php

C
cis2131 author 5/14/2010



Your SQL Query is incorrect. I recommend to check this article that explains the basics of INSERT SQL query:

http://www.webcheatsheet.com/sql/interactive_sql_tutorial/sql_insert.php


Thank you very much for pointing that out... Works now.
Another thing... Could there be an error in the ibox function for View as image, using Thumbnail.
I have anabled the function (text), but it shows the normal picture in both the list and in the ibox.

I have both the full and the th_ image in the folder, and they are both accesible.
What am i doing wrong??
Claus