Jump to content

newbie question


webmissile

Recommended Posts

Folks,

 

I am really new to this, I have the following form:

 

<form action="<?php echo($_SERVER['PHP_SELF']); ?>"

7        method="get">

 

<select name="feed"><?php

ShowSelectOption('http://digg.com/search?section=all&s='. trim($search) ,'diggs'); ?></select>

 

<input name="search" value="<?php echo htmlspecialchars($search); ?>" style="width:220px;background:#fff;" />

<input type="submit" value="Analyze" />

 

<?php

foreach ($_GET as $key=>$search)

          $search.=$key.'='.urlencode($search);

?>

 

</form>

<?php $search = htmlentities($_GET['search']); ?>

</div>

 

It actually works (sorta) ... amazing ... but I need to set the $search so it is ready to go the first time (I currently need to input first, then the variable is ready).

 

I imagine I've given a few of you something to chuckle about but I really need help with this.

 

Dave

Link to comment
https://forums.phpfreaks.com/topic/76476-newbie-question/
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.