Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Why does DWMX return error for valid php oode

Posted 20 May 2006 02:50:10
1
has voted
20 May 2006 02:50:10 Bruce Keller posted:
Hello,
I am trying to figure out why I receive this error when I added valid php code to a functioning DWMX form. In short the code I added works fine its only when I edit the file in DWMX that I get this error. Here is the error:
<img src="www.philsmentorship.com/error.gif" border=0>

Here is the $date variable below(along w/the associated signup_form date and date value) is the code I added. It is not visible on the form.
<pre id=code><font face=courier size=2 id=code> $date = date ( 'D m d' );
if ((isset($HTTP_POST_VARS["MM_insert"])) && ($HTTP_POST_VARS["MM_insert"] == "signup_form") {
$insertSQL = sprintf("INSERT INTO signup_form (date, fname, lname, address, suite, city, `state`, zip, email, phone, fax) VALUES ('$date', %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($HTTP_POST_VARS['fname'], "text",
GetSQLValueString($HTTP_POST_VARS['lname'], "text",
GetSQLValueString($HTTP_POST_VARS['address'], "text",
GetSQLValueString($HTTP_POST_VARS['suite'], "text",
GetSQLValueString($HTTP_POST_VARS['city'], "text",
GetSQLValueString($HTTP_POST_VARS['state'], "text",
GetSQLValueString($HTTP_POST_VARS['zip'], "text",
GetSQLValueString($HTTP_POST_VARS['email'], "text",
GetSQLValueString($HTTP_POST_VARS['phone'], "text",
GetSQLValueString($HTTP_POST_VARS['fax'], "text");
</font id=code></pre id=code>
I was adding a date stamp to indicate when a user input the online form to a mysql database.
Before inputing the PHP code I tried to use the Hidden Field in DWMX but the value filed would not except the date ( 'D m d' ) command, or at least it didn't post any value in the database field. So I put in the php code above and it works fine online ....But DWMX sure doesn't like it.

I do not have any PHP extentions loaded didn't appear to be the problem. If it is what extension should I use.
Any help would be nice!
Thank YOU!

DWMX|PHP|MYSQL

Reply to this topic