Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 9th, 2009, 03:56 PM
Registered User
 
Join Date: Jan 2009
Posts: 1
Thanks: 2
Thanked 0 Times in 0 Posts
Default Database driven information(PHP,Mysql)

hey i am new in PHP language, and i am facing an error since from two days can some body explain me plz whats the error down there on line 22.

1 <?php
2 session_start();
3 ob_start();
4 include "conn.inc.html";
5 ?>
6 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 7 7 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
8 <html xmlns="http://www.w3.org/1999/xhtml">
9 <head>
10<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
11 <title>goalbazar.com</title>
12 </head>
13 <body>
14 <?php
15 if (isset($_POST['submit']) && $_POST['submit'] =="Register") {
16 if ($_POST['username']!="" && ($_POST['password']!="" &&
20 ($_POST['first_name']!="" &&
21 ($_POST['last_name']!="" &&
22 ($_POST['email']!="" ) {
23
24 $query ="SELECT username FROM user_info".
25 "WHERE username ='".$_post['username'] . "'; ";
26 $result =mysql_query($query)
27 or die (mysql_error() ) ;
28 if (mysql_num_row($result) !=0 ) {
Reply With Quote
  #2 (permalink)  
Old February 4th, 2009, 04:15 PM
Authorized User
 
Join Date: Sep 2007
Location: , , .
Posts: 56
Thanks: 0
Thanked 1 Time in 1 Post
Default

Maybe it has to do with your parenthesis:

Code:
 if ($_POST['username']!="" && 
$_POST['password']!="" &&
$_POST['first_name']!="" &&
$_POST['last_name']!="" &&
$_POST['email']!="" )
__________________
free wifi | http://localwifisearch.com
web dev | http://arizonawebdevelopment.com
Reply With Quote
The Following User Says Thank You to sdi126 For This Useful Post:
rajajaaneman (February 18th, 2009)
  #3 (permalink)  
Old February 13th, 2009, 07:25 AM
Authorized User
 
Join Date: Jul 2008
Location: , , India.
Posts: 18
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Your line 22 should be like this


if ($_POST['username']!="" && ($_POST['password']!="" && ($_POST['first_name']!="" && ($_POST['last_name']!="" && ($_POST['email']!="" )))))
Reply With Quote
The Following User Says Thank You to surya For This Useful Post:
rajajaaneman (February 18th, 2009)
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
entering £ (pound sign) into MySQL database - PHP crmpicco PHP Databases 1 November 14th, 2007 02:02 AM
Displaying Information Php/mysql TheSchwa MySQL 1 November 12th, 2007 04:14 PM
Database driven drop down rajneesh Classic ASP Professional 3 May 5th, 2007 01:39 AM
create database in mysql through php coding vivekananth PHP Databases 2 January 31st, 2007 01:48 AM
Interfacing PHP/MYSQL to existing Database... mekh Pro PHP 6 February 8th, 2004 06:04 PM



All times are GMT -4. The time now is 02:33 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.