SunQuest
           Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old April 22nd, 2003, 07:57 PM
swiil swiil is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: USA
Posts: 2 swiil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to swiil
problem inserting and altering

Here is the code, when you go to process the form it comes up

"Unable to create your user information. Please Contact the webmaster for help."

I dont understand what the problem is. It worked just last week. Altering the table gives me the same problem, it dies after the MySQL_query

Thanks for the comments..
Chris

<?php

// This gathers the information collected from the form

$nname = $_POST["newname"];
$npass = $_POST["newpass"];

// This inserts an new entry into the User data base using the collected values


mysql_query ("INSERT INTO tphp ('name' , 'pass') VALUES ('$newname' , '$newpass')")
or die ("Unable to create your user information. Please Contact the webmaster for help.");

// Generates the ID # information to use in the creation of the field data base.

$baseid = mysql_query ("SELECT ID FROM tphp WHERE '$nname' = name")
or die ("Unable to select your user ID please contact the administrator");

$uid = mysql_fetch_assoc($baseid);

$fid = $uid["ID"];

mysql_query ("INSERT INTO flags (intro, user_id) VALUES ('1' , '$fid')")
or die ("Unable to create content entry please contact the administrator.");

echo "$fid";
?>

Reply With Quote
  #2  
Old April 22nd, 2003, 08:28 PM
hh hh is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Aalborg, Denmark
Posts: 36 hh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to hh
RE: problem inserting and altering

try getting some more error reporting, try for example to insert:

php Code:
Original - php Code
  1.  
  2. echo mysql_errno() . ": " . mysql_error() . "n";


after your mysql_query();... what does it say?

Reply With Quote
  #3  
Old April 23rd, 2003, 05:09 PM
swiil swiil is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: USA
Posts: 2 swiil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to swiil
RE: problem inserting and altering

Hey, Thanks for looking at my code, It was a simple quoting problem... Sorry for the bother

Chris

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > problem inserting and altering


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway