Unstoppable Domains

How do I?

Spacemail by SpaceshipSpacemail by Spaceship
Watch

Coolprogram

Established Member
Impact
7
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
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Here is the php code followed by html code.

Search.php

PHP:
<?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,
iNod
 
Last edited:
0
•••
You forgot to make a $url.
 
0
•••
0
•••
Nvm
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back