$_POST Problem

This is a discussion on "$_POST Problem" within the PHP Forum section. This forum, and the thread "$_POST Problem are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 30th, 2007, 15:55
Junior Member
Join Date: May 2007
Location: United Kindom, London and the South East
Age: 17
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Bradster
$_POST Problem

Ok im trying to create a registration page.. http://genome-designs.co.uk/register.php

It has an error as you can probably see;
Code: Select all
Parse error:  syntax error, unexpected T_STRING in /home/genosco/public_html/register.php on line 41
This what the actual code says on line 41;
Code: Select all
VALUES ('".$_POST['username']."', '".$_POST['pass']."')";
Anyone know what I need to do here?
Reply With Quote

  #2 (permalink)  
Old May 30th, 2007, 16:11
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,761
Blog Entries: 1
Thanks: 0
Thanked 18 Times in 18 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: $_POST Problem

I am no expert but shouldn't it be:

Code: Select all
$username = $_POST['username'];
$pass = $_POST['pass'];
then just pass those variables to the DB for verification?

Code: Select all
$result = mysql_query("SELECT * FROM dbName WHERE table1=$username AND table2=$pass");
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)

Last edited by moojoo; May 30th, 2007 at 16:13.
Reply With Quote
  #3 (permalink)  
Old May 30th, 2007, 16:13
Junior Member
Join Date: May 2007
Location: United Kindom, London and the South East
Age: 17
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Bradster
Re: $_POST Problem

Thanks alot moojoo, that worked perfect, I got the code of some "about" article, been trying to look for a fix for ages.
Reply With Quote
  #4 (permalink)  
Old May 30th, 2007, 16:13
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,761
Blog Entries: 1
Thanks: 0
Thanked 18 Times in 18 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: $_POST Problem

Glad it worked =)
__________________
The internet is just a fad.
http://www.mevans76.com
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
Reply

Tags
post, problem, website

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
First image problem and inline list problem konnor5092 Web Page Design 8 Dec 1st, 2007 09:08
[SOLVED] Strange error with $_POST AdRock PHP Forum 2 Oct 13th, 2007 17:12
Weird $_POST error Blake121 PHP Forum 3 Jun 6th, 2007 22:26
Use $_POST variables to transmit session id? masonbarge PHP Forum 9 May 8th, 2007 14:03
pass $_POST data into popup window ktsirig JavaScript Forum 1 Apr 19th, 2006 16:49


All times are GMT. The time now is 01:51.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43