943,562 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 3608
  • PHP RSS
You are currently viewing page 3 of this multi-page discussion thread; Jump to the first page
Sep 16th, 2008
0

Re: PHP Form and Database Help Please

Table Structure:

Field Type
-------------------
name varchar(50)
number int(5)
Reputation Points: 10
Solved Threads: 0
Light Poster
mattyb15 is offline Offline
26 posts
since Apr 2007
Sep 16th, 2008
1

Re: PHP Form and Database Help Please

If you got the solution then ignore this otherwise
try to update the number filed by adding 1 to it where name will be equal to the selected name from database.
Reputation Points: 16
Solved Threads: 2
Light Poster
srilakshmitr7 is offline Offline
32 posts
since Aug 2008
Sep 17th, 2008
0

Re: PHP Form and Database Help Please

echo $name;
tell me what it prints....
Reputation Points: 137
Solved Threads: 162
Posting Virtuoso
Shanti C is offline Offline
1,641 posts
since Jul 2008
Sep 17th, 2008
0

Re: PHP Form and Database Help Please

echo $name;
tell me what it prints....
Okay, in the text box i typed "Matthew" and then I pressed submit. On the next form echo $name answered "Matthew"... so I guess that's working correctly.
Reputation Points: 10
Solved Threads: 0
Light Poster
mattyb15 is offline Offline
26 posts
since Apr 2007
Sep 17th, 2008
0

Re: PHP Form and Database Help Please

please confirm that name(what you typed) is same as name in database....
or post your needed code...
Last edited by Shanti C; Sep 17th, 2008 at 4:04 am.
Reputation Points: 137
Solved Threads: 162
Posting Virtuoso
Shanti C is offline Offline
1,641 posts
since Jul 2008
Sep 17th, 2008
0

Re: PHP Form and Database Help Please

please confirm that name(what you typed) is same as name in database....
or post your needed code...
Thank you very much for your help.

I managed to solve the problem my self.

PHP Syntax (Toggle Plain Text)
  1.  
  2. mysql_query("UPDATE turf_table SET number = (number+1)
  3. WHERE name = '$name'");
Reputation Points: 10
Solved Threads: 0
Light Poster
mattyb15 is offline Offline
26 posts
since Apr 2007
Sep 17th, 2008
0

Re: PHP Form and Database Help Please

Click to Expand / Collapse  Quote originally posted by mattyb15 ...
Thank you very much for your help.

I managed to solve the problem my self.
tel me what your mistake????
Reputation Points: 137
Solved Threads: 162
Posting Virtuoso
Shanti C is offline Offline
1,641 posts
since Jul 2008
Sep 17th, 2008
0

Re: PHP Form and Database Help Please

tel me what your mistake????
No mistake. I just wrote my own code.

Thank you for pointing me in the right direction.
Reputation Points: 10
Solved Threads: 0
Light Poster
mattyb15 is offline Offline
26 posts
since Apr 2007
Sep 17th, 2008
0

Re: PHP Form and Database Help Please

then make your thread solved....
Reputation Points: 137
Solved Threads: 162
Posting Virtuoso
Shanti C is offline Offline
1,641 posts
since Jul 2008
Sep 19th, 2008
0

Re: PHP Form and Database Help Please

then make your thread solved....
How? LOL
Reputation Points: 10
Solved Threads: 0
Light Poster
mattyb15 is offline Offline
26 posts
since Apr 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: code of image genration
Next Thread in PHP Forum Timeline: Finding overnight delivery service in California?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC