Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result


Posted on 16th Feb 2014 07:03 pm by admin

what is wrong with this

Code: [Select]<?php
if ($_SERVER['HTTP_REFERER'])
{
if($_GET['id'])
{
$con = mysql_connect("","","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("rubberduckiee", $con);

$result = mysql_query("SELECT * FROM email_content where id=".$_GET['id']);

while($row = mysql_fetch_array($result))
{

if($_GET['part'] == "body")
{
echo $row['email_content_body'];
}
elseif($_GET['part'] == "footer")
{
echo $row['email_content_footer'];
}
elseif ($_GET['part'] == "header")
{
echo $row['email_content_header'];
}

}
}
}

?>i am getting the error
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/rubberduckiee/webapps/editor/email_editor.php on line 17

No comments posted yet

Your Answer:

Login to answer
92 Like 39 Dislike
Previous forums Next forums
Other forums

Shuffle between users ??
I have multiple $users in table. I need to send them $message.

I need to send the next messag

rand() function
just a general question guys a girls, is the rand() function 100% random or is it based on time?

word wrap in emails help needed
Hello, I understand how wordwrap works in php and have used it well before. However when I used wor

Using system() and bringing back the results
I am aware that you can use system() within PHP to execute system commands, but I was wondering if t

Converting numbers to months
The porgram works -just need the last function(month_convert_ to convert numbers to months -thanks.

Header redirect
Hello ive got a problem ive got form with its action set to itself.
Code: <form id="f

passing an array of objects after submit
How do I do this? This is what I have tried and it is not working.

<form method="

download directory onto C drive
I am attempting (if this is possible) to write a routine to automatically dump the contents of a dir

array_count_values question?
ok i'm trying to create a top ten list from a database of listed favorite movies.

the followi

Running a cron job through PHP/Apache?!
Hello all,
I have a PHP script which makes a cron file from user input. When i try to run the cro

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash