Hello all, I'm trying to send mass private messages to users in my database but keep getting an error... and was hoping someone could help me out.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''john ','Support Staff ','October 20, 2009, 9:32 pm ','Test Message','Test mess' at line 1
Not sure if it's a problem cycling through all the users or what the issue is.
$getmembers = mysql_query("SELECT * FROM user");
$num_rows= mysql_num_rows($getmembers);
while($r =mysql_fetch_array($getmembers)){
$subject = $_POST['subject'];
$message = $_POST['message'];
$from="Support Staff";
$date = date("F j, Y, g:i a");
$to=$r['Fname'];
$spm = mysql_query("INSERT INTO `private_msg` (`to`,`from`,`date`,`subject`,`content`) VALUES '$to ','$from ','$date ','$subject','$message')") or die(mysql_error());
}
Thanks in advance!!
Mail from PHP form not always ending up in my inbox?
Hi guys,I'm a real newbie to PHP and have managed to put together a simple mail form that sends me an email when someone fills it in on my site.The problem I am having, is that sometimes when I test
date function help
i need help with date functionCode: [Select]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
Using Windows message as a Handle
Hi,
Quick Question about echo value
Hey guys, I'm trying to get something to show differently in one of my scripts. I'm trying to make it so that people that are a certain rank in my game will have their names show up bold in the users
Date help - fetch dates for Mondays between xxx and yyy?
Does anyone know the best way to do this? I have two dates, say:2010-01-26 and 2010-05-30and I want to return the dates of all the Mondays between them:2010-02-012010-02-082010-02-15....etc.Thanks
dropdown box help - open php files to textarea
Hi, I am using tinymce to edit content located in several php files. The code I attached works but is missing some functionality and I am very new at php so I need some help or advise please.What I
Match stored value with the current value in a loop
Hello,I have a MySQL db were I store articles in.I have a form to fill these articles, and in that form I can select images who are stored into a directory. Selecting the images works good but the
random generation
hii need help with generating thisnumbers from 1-12i want to generate in random order 60 times in total the numbers 1-12and generate 5 results from each number.so in the total of the 60 return result
array_count_values question?
ok i'm trying to create a top ten list from a database of listed favorite movies.the following code yields me the correct order and number of votes for each movie$compare = array_count_values
webpage with (simple) login & mysql-db
Hi all,What I was looking for before was a multi-user password manager, web-based! The offer of free or cheap tools of this kind is very pover. Or they are too complex (or too expensive)I'm not