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'])
Did you know?Explore Trending and Topic pages for more stories like this.
{
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

help, header() is not working!
Hello, I have this code:


<?php

/**
* @author samoi
* @copyright 200

How to ask a regex question?
Hi, I thought I'd share some of my insight after seeing too many bad questions that either get ignor

Drawing Images in classes
I'm quite new to Object Oriented PHP. What I'm trying to do is draw some images but also have other

Writing to the middle of a file
Hi I have a bit of a problem. Is there any way i can write some text to a middle of a text file. For

disabling a button server-side then re-enabling client-side breaks button postback
I have a tabbed container and a button (not in the container) on a page. If the first tab is selecte

upload image name with extension using php
hi frds..

<input id="file1" type="file" name="file[]" &a

PHP error on MySQL insert
I'm sure it's the simplest of issues, but I can't recall why this isn't working.

Code: [Selec

if statements problems
Hi. I'm trying to make a web form, but I kind of hit a dead end trying to figure out why it doesn't

Update Database
Hi All,


I have a problem with this:

Code: [Select]<?php
session_start();

single values into sql field
i have a form which i want the user to able to select multiple answers. But i want the answers to be

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