Jump to content

Make directory on new user sign-up


Gafferzone

Recommended Posts

Hi guys, I've got a snippet of code that's supposed to make a new directory with the user's unique ID (member_id) in the database. I have the code here but I get a myriad of errors including the infamous "at line 1 error, and the directory does not create. Please help me!!

 

	//Create Directory
$queryString2 = $_SERVER['QUERY_STRING'];
$query2 = "SELECT member_id FROM members WHERE $queryString2 = $row[activation]"; 
$result2 = mysql_query($query2) or die(mysql_error());
mkdir("/home/gafferzo/www/members/clubs/" . mysql_result($result2,0), 0777);  

 

Link to comment
Share on other sites

that error message is more of a help if you actually look at the SQL it is referring to.

 

$query2 = "SELECT member_id FROM members WHERE $queryString2 = $row[activation]"; 
$result2 = mysql_query($query2) or die(mysql_error() . " IN $query2");

 

I used your advice and found that removing the quotes round the $query2 line got rid of my line 1 error, but now using this code I have the following error:

 

	//Create Directory
$queryString2 = $_SERVER['QUERY_STRING'];
$query2 = SELECT member_id FROM members WHERE $queryString2 = $row[activation]; 
$result2 = mysql_fetch_row($query2) or die(mysql_error());
mkdir("/home/gafferzo/www/members/clubs/" . mysql_result($result2,0), 0777);

 

Parse error: syntax error, unexpected T_STRING in /home/gafferzo/public_html/verify.php on line 28

 

Gaahhhh I am so confused  :-\

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.