Forum Moderators: coopster

Message Too Old, No Replies

Send PHP values by web form mail

         

Yangtze

12:23 pm on Mar 30, 2004 (gmt 0)

10+ Year Member



Is that possible to send out the php values by web form?

for example:
<?php echo $x_price;?>

<?php
if ($x_departure!= NULL) {
$sqlwrk = "SELECT * FROM `departure`";
$sqlwrk .= " WHERE `departureID` = " . $x_departure;
$rswrk = mysql_query($sqlwrk);
if ($rswrk && $rowwrk = mysql_fetch_array($rswrk)) {
echo $rowwrk["departurePort"];
}
@mysql_free_result($rswrk);
}
?>

Thanks

Timotheos

4:55 pm on Mar 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Yangtze,

What do you mean by "send out"? Do you want to email the results? http://www.php.net/manual/en/ref.mail.php [php.net]

Tim

Yangtze

5:37 pm on Mar 30, 2004 (gmt 0)

10+ Year Member



I want to send out the results generated from the MySQL database.

For example:
Recoard #1, Regal China, 4 nights, $514, 5 star, Check Availability

Recoard #2, Victoria, 4 nights, $431, 5 star, Check Availability

when a visitor click the link "check availability" after the record he is interested in, it will direct visitors to a new page "display.php", it has more information of the record he/she chose.

I want to add a form in the "display.php" page, like the html feedback form.
However in the form I want to add into the "display.php", visitors will no longer need to input informatin that are generated from the database.

He need to add his/her contact info. and a short message, then press "submit".

What I will receive is not only contact info. and the possible message left by the visitor, but also information generated from the database.

So I can know which availability information he/she is asking for.

I was completely new to PHP and MySQL one month ago, with great effort of myself and help from you guys, I have managed to create a nice searchable and editable database.
And now I need the help from you again.

Any hint would be highly appreciated.

coopster

11:48 pm on Mar 30, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



There is a nice little tutorial in the PHP Library [webmasterworld.com] that may help. It is called Basics of extracting data from MySQL using PHP [webmasterworld.com].