NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page How do i?

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
5 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 10-09-2005, 08:48 PM THREAD STARTER               #1 (permalink)
NamePros Regular
Join Date: Jul 2005
Location: U.S.A.
Posts: 655
Coolprogram has a spectacular aura aboutCoolprogram has a spectacular aura about
 



How do i?


Okay i want to know how to get like a search thing on my website. ummm a search bar. I just want a google search bar and a search bar for my site. How do i do this. NO ASP.
Thanks,
-Coolprogram
Coolprogram is offline  
Old 10-09-2005, 09:14 PM   #2 (permalink)
Eating Pie
 
iNod's Avatar
Join Date: Nov 2004
Location: Canada
Posts: 2,267
iNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud of
 


Special Olympics AIDS/HIV Cystic Fibrosis Save The Children Baby Health Cystic Fibrosis
Here is the php code followed by html code.

Search.php

PHP Code:
<?php
/* Created by iNod */
// Check to see if search was received. Declare google url
if(isset($search)) {

// Declare url. And replace + for all spaces
$url 'http://www.google.ca/search?q='.$search.'&hl=en&lr=&start=10&sa=N';
$url str_replace(' ','+',$url);

header('location: $url');
}else{
print 
'No submit was found';
}
?>
HTML
Code:
<form method="post" action="search.php">
Search: <input type="text" name="search" value="search"><br>
<input type="submit" name="submit" value="Search!">
Thanks,
????: NamePros.com http://www.namepros.com/programming/130393-how-do-i.html
iNod
__________________
I feel old.
Last edited by iNod; 10-09-2005 at 09:59 PM.
iNod is offline  
Old 10-09-2005, 09:51 PM THREAD STARTER               #3 (permalink)
NamePros Regular
Join Date: Jul 2005
Location: U.S.A.
Posts: 655
Coolprogram has a spectacular aura aboutCoolprogram has a spectacular aura about
 



You forgot to make a $url.
Coolprogram is offline  
Old 10-09-2005, 10:00 PM   #4 (permalink)
Eating Pie
 
iNod's Avatar
Join Date: Nov 2004
Location: Canada
Posts: 2,267
iNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud of
 


Special Olympics AIDS/HIV Cystic Fibrosis Save The Children Baby Health Cystic Fibrosis
Originally Posted by Coolprogram
You forgot to make a $url.

What?
__________________
I feel old.
iNod is offline  
Old 10-09-2005, 10:26 PM THREAD STARTER               #5 (permalink)
NamePros Regular
Join Date: Jul 2005
Location: U.S.A.
Posts: 655
Coolprogram has a spectacular aura aboutCoolprogram has a spectacular aura about
 



Nvm
Coolprogram is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 02:02 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger