Forum Moderators: coopster

Message Too Old, No Replies

Really stuck

         

Chris_Coin

12:58 am on Sep 17, 2005 (gmt 0)

10+ Year Member



hey, i know next to nothing about php, i had a friend create a form that would send me the info to my email.
then the first line of the forum would be directly added to a list on the same page

my problem is that the "artist name" does not get added to the "registered artists" list

when he sent me the index all i did was upload to my server and create the db, is there anything else i need to do?

[edited by: jatar_k at 1:19 am (utc) on Sep. 17, 2005]
[edit reason] no urls thanks [/edit]

jatar_k

1:20 am on Sep 17, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



well I see this

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in index.php on line 49

that seems like an issue. What is on line 49?

I am assuming this 'friend' isn't around to support his code.

We're going to need a little more info about how it works

where does the 'registered artists' list come from? the database?

what happens when you submit the form? nothing? error? you get email but not in the database?

Chris_Coin

1:35 am on Sep 17, 2005 (gmt 0)

10+ Year Member



does this help?

<?php
mysql_connect($db_host,$db_user,$db_pass);
mysql_select_db($db_name);
$query=mysql_query("SELECT * FROM `mail_list`");

(LINE 49)while($row=mysql_fetch_array($query)){

print "<tr><td>$row[artist_name]</td></tr>";
}
?>

jatar_k

2:08 am on Sep 17, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



looks like the query is dying

change this
$query=mysql_query("SELECT * FROM `mail_list`");

to this
$query=mysql_query("SELECT * FROM `mail_list`") or die(mysql_error());

there should be an error in the browser when you change and upload that, paste it here

unfortunately, I am on my way out, someone else is around though