Forum Moderators: coopster

Message Too Old, No Replies

php and forms

         

helenp

7:35 pm on Jan 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi,
I donīt know if this is where to post this, and if it is possible to do.

I have an bookingform where the dates of arrival and departure are in includes and separated by day and year-month, the form action is ACTION="/cgi-sys/FormMail.cgi.

I have includes like this in the form:
<p>Arrival: <?php include("includes/day.php");?><?php include("includes/month.php");?>

and the selects like this one:
<select name="day" size="1">

When the form is submitted on the e-mail we receive of course I get the value of the selects as an result like this:
day: 31

month: 2006-05

day2: 07

month2: 2006-06

Is there a way to change the result of the e-mail I receive to do it arrival-date: 31-05-2006 or 2006-05-31?

jatar_k

4:40 am on Jan 30, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you will need to mess around with the formmail script to change the way it formats things

helenp

8:46 am on Jan 30, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



thanks jatar_k
Actually that script is the one the host offers as secure, and I have since the start when I didnīt new php.
But know I could do my own php-form instead of using their FormMail.cgi script.

If I put all the vars in like this:
$day = mysql_real_escape_string($_POST['day']);
would an php form be the same as secure?

Any good posts for php forms?