Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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 ) {
 
Old February 4th, 2009, 04:15 PM
Authorized User
 
Join Date: Sep 2007
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
The Following User Says Thank You to sdi126 For This Useful Post:
rajajaaneman (February 18th, 2009)
 
Old February 13th, 2009, 07:25 AM
Authorized User
 
Join Date: Jul 2008
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']!="" )))))
The Following User Says Thank You to surya For This Useful Post:
rajajaaneman (February 18th, 2009)





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.