freelanceprogrammers.org Forum Index » PHP

Using PHP to Search for HTML file


View user's profile Post To page top
warreng_online Posted: Mon Sep 05, 2005 1:35 pm


Joined: 05 Sep 2005

Posts: 1
Using PHP to Search for HTML file
Hello,

I am new to this group. I am wondering if anyone knows how to make a
search box and code it using PHP to search one folder (not the entire
site) for the file name (password) the user types in.

An example in javascript is at :

http://www.realapplets.com/

Check SecretPass to see the example completed in javascript. What it
does it you type in a password, say "stargate", it will search and
bring up an individual file named "stargae.html". I would also like
the word to be listed with normal characters, not password `stars`
(*).

I would love to have this duplicated in PHP.

Any help with this will be greatly appreciated.

Thank you,

Warren
Reply with quote
Send private message
View user's profile Post To page top
dewebbster Posted: Tue Sep 06, 2005 2:39 am


Joined: 06 Sep 2005

Posts: 16
Using PHP to Search for HTML file
How about

<?
header("Location: http://".$HTTP_SERVER_VARS[`HTTP_HOST`]
.dirname($HTTP_SERVER_VARS[`PHP_SELF`])
._POST[`a`] . ".html" );
?>
<html>
<form action "<? echo $HTTP_SERVER_VARS[`PHP_SELF`]); ?>" method="POST">
<input name="a"><input type="submit">
</form>
</html>

;)
-m

On Sep 5, 2005, at 3:35 AM, Warren wrote:

> Hello,
>
> I am new to this group.  I am wondering if anyone knows how to make a
> search box and code it using PHP to search one folder (not the entire
> site) for the file name (password) the user types in.
>
> An example in javascript is at :
>
> http://www.realapplets.com/
>
> Check SecretPass to see the example completed in javascript.  What it
> does it you type in a password, say "stargate", it will search and
> bring up an individual file named "stargae.html".  I would also like
> the word to be listed with normal characters, not password `stars`
> (*).
>
> I would love to have this duplicated in PHP.
>
> Any help with this will be greatly appreciated.
>
> Thank you,
>
> Warren
>
>
>
>
>
>
> PHP Data object relational mapping generator -
> http://www.meta-language.net/
>
>
>
> SPONSORED LINKS
> Php developer
> Basic programming language
> Computer programming languages
> Programming languages
> Object oriented programming tutorial
> Java programming language
>
> YAHOO! GROUPS LINKS
>
> ▪  Visit your group "php-objects" on the web.
>  
> ▪  To unsubscribe from this group, send an email to:
>  php-objects-unsubscribe@yahoogroups.com
>  
> ▪  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
>
>


[Non-text portions of this message have been removed]
Reply with quote
Send private message
View user's profile Post To page top
dewebbster Posted: Tue Sep 06, 2005 8:36 am


Joined: 06 Sep 2005

Posts: 16
Using PHP to Search for HTML file
oops, sorry about that... I should know better than to commit code
while kids and wife await....
That first line *really* needs a conditional if wrapping it, looking
for a post..
if ($_POST) header("Location: etc...
-m

On Sep 5, 2005, at 4:39 PM, Michael Slavin wrote:

> How about
>
> <?
>       header("Location: http://".$HTTP_SERVER_VARS[`HTTP_HOST`]
>                                      
> .dirname($HTTP_SERVER_VARS[`PHP_SELF`])
>                                      
._POST[`a`] . ".html" );
> ?>
> <html>
> <form action "<? echo $HTTP_SERVER_VARS[`PHP_SELF`]); ?>"
> method="POST">
> <input name="a"><input type="submit">
> </form>
> </html>
>
> ;)
> -m
>
> On Sep 5, 2005, at 3:35 AM, Warren wrote:
>
> > Hello,
> >
> >  I am new to this group.  I am wondering if anyone knows how to
> make a
> >  search box and code it using PHP to search one folder (not the
> entire
> >  site) for the file name (password) the user types in.
> >
> >  An example in javascript is at :
> >
> > http://www.realapplets.com/
> >
> >  Check SecretPass to see the example completed in javascript.  What
> it
> >  does it you type in a password, say "stargate", it will search and
> >  bring up an individual file named "stargae.html".  I would also
> like
> >  the word to be listed with normal characters, not password `stars`
> >  (*).
> >
> >  I would love to have this duplicated in PHP.
> >
> >  Any help with this will be greatly appreciated.
> >
> >  Thank you,
> >
> >  Warren
> >
> >
> >
> >
> >
> >
> > PHP Data object relational mapping generator -
> > http://www.meta-language.net/
> >
> >
> >
> > SPONSORED LINKS
> > Php developer
> > Basic programming language
> > Computer programming languages
> > Programming languages
> > Object oriented programming tutorial
> > Java programming language
> >
> > YAHOO! GROUPS LINKS
> >
> >       ▪        Visit your group "php-objects" on the web.
> >  
> >       ▪        To unsubscribe from this group, send an email
to:
> >  php-objects-unsubscribe@yahoogroups.com
> >  
> >       ▪        Your use of Yahoo! Groups is subject to the
Yahoo!
> Terms of
> > Service.
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
> PHP Data object relational mapping generator -
> http://www.meta-language.net/
>
>
>
> SPONSORED LINKS
> Php developer
> Basic programming language
> Computer programming languages
> Programming languages
> Object oriented programming tutorial
> Java programming language
>
> YAHOO! GROUPS LINKS
>
> ▪  Visit your group "php-objects" on the web.
>  
> ▪  To unsubscribe from this group, send an email to:
>  php-objects-unsubscribe@yahoogroups.com
>  
> ▪  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
>
>


[Non-text portions of this message have been removed]
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
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
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help