Jump to content

Hidden forms


MDanz

Recommended Posts

<?php

//get data

 

 

 

 

$button = $_GET['submit'];

$search = $_GET['search'];

 

if

 

(!$button)

echo "You didn't submit a keyword";

 

else

{

if(!isset($search) ||  strlen($search)<=2)

echo "<br><font color=white>search term too short</font>";

else

{

echo "<br><br><font color=white>you searched for <b>$search</b></font><hr size='1'>";

}

mysql_connect("localhost", "Master", "password");

mysql_select_db("Login");

 

 

//explode our search term

$search_exploded = explode(" ",$search);

foreach($search_exploded as $search_each)

{

//construct query

$x++;

if($x==1)

        $construct .= "keywords LIKE '$search_each'";

        else

        $construct .= "OR keywords LIKE '$search_each'";

}

 

                  //echo out $construct

$construct = "SELECT * FROM Upload WHERE $construct";

}              $run = mysql_query($construct);

                $foundnum =  mysql_num_rows($run);

 

if  ($foundnum==0)

echo "<br><br><font color=white>No Stacks Found</font>";

else

{

    echo "<font color=white>$foundnum Stacks Found!</font><p>";

if($_GET['RadioGroup1']== 1 )

$margin = 'style="margin-left:60px"';

else if($_GET['RadioGroup1']== 2 )

$margin = 'style="margin-left:120px"';

else if($_GET['RadioGroup1']== 3 )

$margin = 'style="margin-left:180px"';

else if($_GET['RadioGroup1']== 4 )

$margin = 'style="margin-left:240px"';

else if($_GET['RadioGroup1']== 5 )

$margin = 'style="margin-left:300px"';

else if($_GET['RadioGroup1']== 6 )

$margin = 'style="margin-left:360px"';

else if($_GET['RadioGroup1']== 7 )

$margin = 'style="margin-left:420px"';

else if($_GET['RadioGroup1']== 8 )

$margin = 'style="margin-left:480px"';

else

$margin = 'style="margin-left:0px"';

echo '<br><table '.$margin.'>';

 

      while ($runrows = mysql_fetch_assoc($run))

    {

              //get data

        $name = $runrows['name'];

        $image = $runrows['image'];

        $hyperlink = $runrows['hyperlink'];

        $currency = $runrows['currency'];

        $info = $runrows['info'];

        $type = $runrows['type'];

 

 

        echo '<tr><td>';

switch ($type) {

    case 'I':

        echo '<img src="http://www.u-stack.com/Image.jpg">';

        break;

    case 'M':

        echo '<img src="http://www.u-stack.com/Music.jpg">';

        break;

    case 'F':

        echo '<img src="http://www.u-stack.com/File.jpg">';

        break;

    case 'V':

        echo '<img src="http://www.u-stack.com/Video.jpg">';

        break;

        case 'J':

        echo '<img src="http://www.u-stack.com/Job.jpg">';

        break;

        case 'D':

        echo '<img src="http://www.u-stack.com/Discussion.jpg">';

        break;

        case 'P':

        echo '<img src="http://www.u-stack.com/Product.jpg">';

        break;

 

 

 

}  echo '</td></tr>';

 

 

 

    }

   

   

    echo '</table>';

 

 

 

}

 

 

?>

 

^^this is a working search engine, how would i submit the results i'm echoing into the hidden form?  And the hidden form echo the results back to the search engine.  So when i do a new search the results are still displayed..

 

..not asking you to do it, just really need some help

Link to comment
https://forums.phpfreaks.com/topic/169154-hidden-forms/#findComment-892539
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.