473,402 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Mysql Query does not select Ic number

mmarif4u
Hi every one,
I write down the code for a page that a user enter thier
ic number with his access code(which is already in the database)
but now i am facing problem, coz without sessions i want it to confirm
tha values against the database & than go for next page where user can
enter thier other details, like fullname,email,username,h/p etc.
Is for this the sessions required.

My mysql is query is:

Expand|Select|Wrap|Line Numbers
  1. dbConnect('db');
  2.  
  3.     if ($_POST['icnumber']==''
  4.       or $_POST['acccode']=='')  { 
  5.          error ('One or more required fields were left blank.\\n'.
  6.               'Please fill them in and try again.');
  7.     }
  8.  
  9.  
  10.     $icnumber=($_POST['icnumber']);
  11.   $acccode=($_POST['acccode']);
  12.     $sql = "SELECT icnumber,acccode FROM m_users WHERE
  13.         icnumber = '$icnumber' AND acccode = '$acccode'";
  14.     $result = mysql_query($sql);
  15.      if (!mysql_query($sql)<0)
  16.     {
  17.         include ('add.html');
  18.             exit;
  19.             }
  20.     else
  21.     {    
  22.         error('A database error occurred in processing your '.
  23.               'submission.\\nIf this error persists, please '.
  24.               'contact you@example.com.');
  25.  
  26.  
  27.  
  28. }
  29.  
Plz any body have some idea ,
thanks.
Dec 28 '06 #1
2 1864
sashi
1,754 Expert 1GB
Hi every one,
I write down the code for a page that a user enter thier
ic number with his access code(which is already in the database)
but now i am facing problem, coz without sessions i want it to confirm
tha values against the database & than go for next page where user can
enter thier other details, like fullname,email,username,h/p etc.
Is for this the sessions required.

My mysql is query is:

[code]
dbConnect('db');

if ($_POST['icnumber']==''
or $_POST['acccode']=='') {
error ('One or more required fields were left blank.\\n'.
'Please fill them in and try again.');
}


$icnumber=($_POST['icnumber']);
$acccode=($_POST['acccode']);
$sql = "SELECT icnumber,acccode FROM m_users WHERE
icnumber = '$icnumber' AND acccode = '$acccode'";
$result = mysql_query($sql);
if (!mysql_query($sql)<0)
{
include ('add.html');
exit;
}
else
{
error('A database error occurred in processing your '.
'submission.\\nIf this error persists, please '.
'contact you@example.com.');



}
[code]

Plz any body have some idea ,
thanks.
Hi there,

Please do not make duplicate post, i believe your problem is heard in your first post itself. Hang on till someone fine a solution for the issue. Take care.
Dec 28 '06 #2
ronverdonk
4,258 Expert 4TB
Firstly: you opened 3 threads about this problem in this forum! I removed 2 of them. You will not be helped any quicker, the contrary, when you double post!

Now to the question at hand: I don't see what you want. You already check if a user exists, so what else do you want to check?

Ronald :cool:
Dec 28 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Phil Powell | last post by:
The table already has a fulltext index and from there I can use the MySQL fulltext search query to get results as well as the relevancy score. The problem I have is that MySQL has a default...
0
by: Lenz Grimmer | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, MySQL 4.0.14, a new version of the popular Open Source/Free Software Database, has been released. It is now available in source and binary...
0
by: Philip Stoev | last post by:
Hi all, Please tell me if any of this makes sense. Any pointers to relevant projects/articles will be much appreciated. Philip Stoev http://www.stoev.org/pivot/manifest.htm ...
0
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest...
1
by: jlee | last post by:
I'm pretty much a newbie on mysql, and I need some help. I am running mysql Ver 12.22 Distrib 4.0.24, for portbld-freebsd5.4 (i386) on a server hosting an active website. The site's developer...
1
by: Good Man | last post by:
Hi there I've noticed some very weird things happening with my current MySQL setup on my XP Laptop, a development machine. For a while, I have been trying to get the MySQL cache to work....
8
by: Fred | last post by:
Hello, Our website is currently developed in ASP/Mysql 4. The dedicated servers on which it is currently hosted arrive at saturation. Here is their configuration: - 1 server PIV 2,8Ghz 1GB...
6
by: Ridge Burner | last post by:
Can someone tell me which of these 2 SQL queries will be more efficient? I'm having a debate with another guy about which would be less resource intensive for MySQL. The first uses MySQL to pick...
6
Atli
by: Atli | last post by:
This is an easy to digest 12 step guide on basics of using MySQL. It's a great refresher for those who need it and it work's great for first time MySQL users. Anyone should be able to get...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.