473,406 Members | 2,894 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,406 software developers and data experts.

supplied argument is not a valid MySQL result resource

1
hi i get the following errors returning me folloing post to data base
Expand|Select|Wrap|Line Numbers
  1. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Documents and Settings\chris1\My Documents\xampp\htdocs\elp\modify_information.php on line 89
  2.  
  3. Warning: Cannot modify header information - headers already sent by (output started at C:\Documents and Settings\chris1\My Documents\xampp\htdocs\elp\modify_information.php:89) in C:\Documents and Settings\chris1\My Documents\xampp\htdocs\elp\modify_information.php on line 90
  4.  
using xammp mysql apache

code starts at line 84

Expand|Select|Wrap|Line Numbers
  1.   $RSStudent=$RSStudent_query=@mysql_query(("update OCStudents set StudentName = '"
  2.     .$_POST["Name"]."', StudentEmailAddress = '"
  3.     .$_POST["EmailAddress"]."', StudentPassword = '"
  4.     .$_POST["Password"]."' where StudentID = "
  5.     .$_SESSION['StudentID']),$conn);
  6. $RSStudent=mysql_fetch_array($RSStudent_query);
  7. ;header("Location: "."student_menu.php");}
  8. ?>
  9. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
  10.  
lines affected are in bold...lines 89 and 90
any ideas how to solve this
thanks in advance chris
Sep 12 '07 #1
3 1245
ronverdonk
4,258 Expert 4TB
Welcome to TSDN.
In future enclose your code within code tags. See the Posting Guidelines at the top of this forum.

First statement (84) should be
[php]$RSStudent_query=@mysql_query(("update OCStudents set StudentName = '"
[/php]
Ronald
Sep 12 '07 #2
code green
1,726 Expert 1GB
The query is an UPDATE.
A SELECT returns rows not an UPDATE.
And PLEASE adopt accepted practice for variable names. Ugh!
Sep 12 '07 #3
kovik
1,044 Expert 1GB
Be sure that you know what your queries are doing before trying to do things with them. mysql_fetch_* functions are for SELECT statements, as they are the only queries that return a result set.
Sep 12 '07 #4

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

Similar topics

3
by: petemaxi | last post by:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\tockholes\includes\menu.inc.php on line 9 <div class="left"> <div class="menu">...
4
by: Ryanlawrence1 | last post by:
Heya, I get these 2 errors: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/themepar/public_html/changepass.php on line 20 You have not entered all the...
2
by: techjohnny | last post by:
Error: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/jplane/certcent/phpweb/quiz/index.php on line 20 Warning: mysql_num_rows(): supplied argument is...
1
by: lsmamadele | last post by:
I am getting the following error messages in my search: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mamadele/public_html/BESTPLAYS/search.php on...
11
by: Breana | last post by:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/breana/public_html/category.php on line 88 ------------------------------------------- It does this...
5
by: Mubs | last post by:
Hi, I 'am trying to connect my sql database with my webpage for users log in. i have got this script so far but i keep getting the following error message which i cannot figure out.. could any1...
4
by: fisherd | last post by:
When i run this code, i keep getting this message; Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\wamp\www\checklogin.php on line 26 i use this code to...
4
by: kalyanip14 | last post by:
Hi I am new to Php.I am trying to read My sql database data from table to php. I am getting this warning Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource ...
2
by: perhapscwk | last post by:
When I run my site from localhost, no error, but when I move it to webhosting, it show below error, why? Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in...
2
by: macdalor | last post by:
Hi! I'm completely new to all dev and trying to put a website together using MySQLI and PHP; was running fine until I try to gather the DB content with the following script: <?...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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
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.