Current location: Hot Scripts Forums » Programming Languages » PHP » Does anyone know what this error means?


Does anyone know what this error means?

Reply
  #1 (permalink)  
Old 05-03-09, 04:58 PM
Dillon Dillon is offline
Newbie Coder
 
Join Date: Feb 2009
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Does anyone know what this error means?

Hello I am making a website in php, and mysql, and I am getting this error at the top of one of the pages, does anyone know what it means, and how to fix it? Thanks alot!

The error is:
Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/halescom/public_html/FBLA_Reservation/providerinfo.php on line 15

Heres the code:
PHP Code:

<?


$areacode 
$_GET["areacode"];
$phonenum $_GET["phonenum"];
$provider $_GET["provider"];

include (
'providerinfo.php');

$num $areacode $phonenum $to;

echo (
"this is what it got $num");

//This is the MySQL Information
$username="**";
$password="*****";
$database="****";

//This tells to connect to the MySQL Database, via the provided information above
mysql_connect(localhost,$username,$password);
@
mysql_select_db($database) or die( "Unable to select database");

//The query is to insert data into the "Info" table
$query "INSERT INTO `txtusers` (`mobile`) VALUES ('$num')";
//$result = mysql_query($query);
mysql_close();

?>
-Dillon
Reply With Quote
  #2 (permalink)  
Old 05-03-09, 05:04 PM
phpdoctor's Avatar
phpdoctor phpdoctor is offline
Code Guru
 
Join Date: Feb 2007
Location: New Zealand
Posts: 767
Thanks: 4
Thanked 2 Times in 2 Posts
Looks like the error is coming from 'providerinfo.php'
Could you show us the code in that file?
__________________
01010000 01001000 01010000
Reply With Quote
  #3 (permalink)  
Old 05-03-09, 05:42 PM
Dillon Dillon is offline
Newbie Coder
 
Join Date: Feb 2009
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Here ya go

PHP Code:

<?


if( $provider == "Alltel" ) {

$to "$num@message.Alltel.com";
$subject "CONFIRMATION";
$body "$confirmmessage";

if (
mail($to$subject$body)) {
include (
'providerpage.php');
}

}

if( 
$provider == "AT&T" ) {

$to "$num@txt.att.net";
$subject "CONFIRMATION";
$body "$confirmmessage";

if (
mail($to$subject$body)) {
include (
'providerpage.php');
}

}

if( 
$provider == "Cingular" ) {

$to "$num@cingularme.com ";
$subject "CONFIRMATION";
$body "$confirmmessage";

if (
mail($to$subject$body)) {
include (
'providerpage.php');
}

}

if( 
$provider == "Nextel" ) {

$to "$num@messaging.nextel.com  ";
$subject "CONFIRMATION";
$body "$confirmmessage";

if (
mail($to$subject$body)) {
include (
'providerpage.php');
}

}

if( 
$provider == "Sprint" ) {

$to "$num@messaging.sprintpcs.com ";
$subject "CONFIRMATION";
$body "$confirmmessage";

if (
mail($to$subject$body)) {
include (
'providerpage.php');
}

}

if( 
$provider == "SunCom" ) {

$to "$num@tms.suncom.com ";
$subject "CONFIRMATION";
$body "$confirmmessage";

if (
mail($to$subject$body)) {
include (
'providerpage.php');
}

}

if( 
$provider == "T-Mobile" ) {

$to "$num@tmomail.ne";
$subject "CONFIRMATION";
$body "$confirmmessage";

if (
mail($to$subject$body)) {
include (
'providerpage.php');
}

}

if( 
$provider == "Verizon" ) {

$to "$num@vtext.com";
$subject "CONFIRMATION";
$body "$confirmmessage";

if (
mail($to$subject$body)) {
include (
'providerpage.php');
}

}

?>
Reply With Quote
  #4 (permalink)  
Old 05-03-09, 07:20 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by Dillon View Post
Hello I am making a website in php, and mysql, and I am getting this error at the top of one of the pages, does anyone know what it means, and how to fix it? Thanks alot!

The error is:
Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/halescom/public_html/FBLA_Reservation/providerinfo.php on line 15
This often means that the mySQL query returned no results, yet the code is attempting to process or use the results anyway.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 08:35 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.