PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
ThePiston
Worker
Worker


Joined: Dec 22, 2004
Posts: 135

PostPosted: Sat Jan 29, 2005 4:30 pm Reply with quote Back to top

I'm sending a form result into a php script...

this is the form code (note the form action="search.php")
Code:
<form action="search.php" method="post">
<fieldset>
<legend><h3>Please select an area of Central Virginia where you wish to find an Optometrist</h3>
<p>
    <input type="checkbox" name="locids[]" value="8">
Richmond City/Fan Area<br>
<input type="checkbox" name="locids[]" value="1">
Far West End (Short Pump, Goochland, etc.)<br>   
    <input type="checkbox" name="locids[]" value="2">
Near West End (Willow Lawn, Parham Rd.)<br>
<input type="checkbox" name="locids[]" value="3">
    North (Ashland, Hanover, etc.) <br>
    <input type="checkbox" name="locids[]" value="4">
    South
    (Midlothian, Chester, etc.) <br>
    <input type="checkbox" name="locids[]" value="5">
    East End <br>
    <input type="checkbox" name="locids[]" value="6">
    Colonial Heights/Petersburg/Hopewell<br>
    <input type="checkbox" name="locids[]" value="7">
    Mineral/Louisa<br>
  </p>
</fieldset>
<input value="Search Doctors" type="submit" >
</form>



this is the search code
Code:
<?php
require_once("mainfile.php");

  $numElements = count($locids);
 
  for($counter=0; $counter < $numElements; $counter++)
{
value
  if($locations == "") {
     
    $locations = $locids[$counter];   
   
  } 

   else {
    $locations = $locations.",".$locids[$counter];
   }
}

$result = $db->sql_query("select u.name, o.offname, o.add1, o.add2, o.city, o.state, o.zip, o.phone, o.fax FROM nuke_users u, offices o,  locationcodes l WHERE  u.user_id = o.userid and   o.locationid = l.locationid AND l.locationid IN ($locations)");

= '$area'");
("SELECT *users_office3* FROM nuke_users IF users_location3 = '$area'");
("SELECT *users_office4* FROM nuke_users IF users_location4 = '$area'");
("SELECT *users_office5* FROM nuke_users IF users_location5 = '$area'"); */
$num = $db->sql_numrows($result);

while($row=mysql_fetch_assoc($result)) {
  echo "<center>$row[name], $row[offname], $row[add1], $row[add2], $row[city], $row[state], $row[zip], $row[phone], $row[fax]</center> ";
}

[user_office5]
mysql_free_result($result);
exit;

?>


If I use "search.php" in the form code then that "search.php" page comes up in a page outside of nuke... I put the search code into a "comments" page and instead of "search.php" I replaces "search.php" with the new "comments" url I created so the results couwl come up inside nuke, but the code was simply output as text on the comments page... no results. Is there a way I can have my results come out inside a nuke page?
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum