Reply to Re: form/php problem

Your name:

Reply:


Posted by Mr. Newt on 06/02/07 19:42

Figured it. Just change the name of the form from htm to php. =)


"Mr. Newt" <lektrikpuke@_yahoo.com> wrote in message
news:PbGdnUz5w6YCWfzbnZ2dnUVZ_uuqnZ2d@comcast.com...
> Hi y'all,
>
> I've made the below work by combining the 2 pages ( form and php file)
> into 1, but when I run the separated files the php file isn't run, it's
> displayed. Any ideas?
>
> Thanks.
>
> Robert
>
> **************************
> Form
> **************************
> <html>
> <head></head>
> <body>
> <form action="display_details.php" method="post">
> <p>Which record would you like to see?</p>
> <P>Enter Record #<br>
> <input type="text" name="adv_id" size="5">
> <input type="submit" value="View Record">
> </form>
> </body>
> </html>
>
> **************************
> PHP file (display_details.php)
> **************************
> <?php
> include ("connect.php");
>
> if(!empty($_POST))
> {
> $adv_id = $_POST['adv_id'];
> $result=mysql_query("SELECT * FROM advertiser_tbl WHERE adv_id =
> '$adv_id'") or die (mysql_error());
> while ($newArray = mysql_fetch_array($result)){
> $adv_id = $newArray['adv_id'];
> $adv_name = $newArray['adv_name'];
> $cont_name = $newArray['cont_name'];
> $cont_title = $newArray['cont_title'];
> $address = $newArray['address'];
> $city = $newArray['city'];
> $state = $newArray['state'];
> $zip = $newArray['zip'];
> $active = $newArray['active'];
> $notes = $newArray['notes'];
>
> echo "<br><br>$adv_id: <b>$adv_name</b><br>";
> echo "<b>Contact:</b> $cont_name <b>Title:</b> $cont_title<br>";
> echo "$address<br>";
> echo "$city, $state $zip<br>";
> if ($active=="1") echo "<b>Active</b><br>";
> echo "Notes: $notes<br><br>";
> }}
>
> ?>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация