[thelist] PHP_SELF / Contact Form

Kevin Timmins kipper_timmins at live.co.uk
Thu Jul 29 15:35:13 CDT 2010

>> Using action="<?php 'mypages/contact.php' ?>" method="post" >
>> I get this:
>> Warning:  mysql_real_escape_string() [function.mysql-real-escape-string]: 
>> Access denied for user '***'@'localhost' (using password: NO)
>> in /home/***/***/***/mypages/contact.php on line 27
>> and html source code it says action=" "
>> I have not set up any users and that I do not connect to the database 
>> within contact.php file
> As you do not have an established connection to a database, this
> function is useless. Just scrap it from your input validation.
> Concerning the action attribute, use plain action="contact.php" or
> action="mypages/contact.php" without the php PI

Yeah I'm echoing Jens here, and I think that is actually part of the issue, 
I think
using that function expects a mysql connection, from looking at the error so
just get rid of it.
also make your action bit as
action="mypages/contact.php" method="post" >
Personally no matter what I do, I try to just do REQUEST when i am trying to 
variables from POST or GET, it works with either method
Next, if when you post the form all you are getting is the entire script 
output to the
browser unparsed then it seems to me as though the file isnt even being 
parsed by
php in which case server issue

Hope this is of some help in the debug


More information about the thelist mailing list