HELP simple html i just totally forgot lmao been a while

07/01/2011 23:23 allizzel777#1
i have a website [Only registered and activated users can see links. Click Here To Register...] its not done at all, i want to change the search box and make it work... but when someone searches i want it to ONLY search MY SITE not Google or any other sites please help me here is the html i have. how can i make that without changing the look or adding radio buttons and make it search only my site?

<div id="search_box">
<form action="#" method="post">
<input type="text" value="Search on this website" name="q" size="10" id="searchfield" title="searchfield" onfocus="clearText(this)" onblur="clearText(this)" />
<input type="submit" name="Search" value="" id="searchbutton" title="Search" />
</form>
</div>


Yea yea i know there is a way and its probably simple. i just totally forgot its been like 2 years since i used html or anythin and i cant remember please help ill put it in German as well



German

Ich habe eine Webseite [Only registered and activated users can see links. Click Here To Register...] seine nicht getan überhaupt, ich möchte das Suchfeld ändern und damit es funktioniert ... aber wenn jemand nach i sie nur suchen MY SITE wollen nicht Google oder anderen Websites bitte helft mir hier ist der html i haben. Wie kann ich sicherstellen, dass ohne das Aussehen oder das Hinzufügen von Radio-Buttons und machen sie zu suchen nur meine Website?


Yea yea Ich weiß, es ist ein Weg, und es ist wahrscheinlich einfacher. Ich vergaß völlig, es ist wie 2 Jahre her, seit ich html oder anythin verwendet und i cant remember bitte helfen Sie krank steckte es in Englisch als auch
07/02/2011 09:38 Project Rivalry#2
you need php .. to search
07/02/2011 12:07 allizzel777#3
Quote:
Originally Posted by GAMER19951 View Post
you need php .. to search
no i mean something like this but without the radio button and i want it to automatically search my site

Code:
<form method="get" action="http://www.google.com/search">

<input type="text"   name="q" size="31"
 maxlength="255" value="" />
<input type="submit" value="Google Search" />
<input type="radio"  name="sitesearch" value="" />
 The Web
<input type="radio"  name="sitesearch"
 value="askdavetaylor.com" checked /> Ask Dave Taylor<br />

</form>
07/02/2011 12:26 ms​#4
Code:
<form method="get" action="http://www.google.com/search">

<input type="text"   name="q" size="31"
 maxlength="255" value="" />
<input type="hidden"  name="sitesearch"
 value="[COLOR="Red"]mysite.com[/COLOR]" checked />
<input type="submit" value="Google Search" />

</form>
Replace "mysite.com" with whatever site you want Google to search.
07/02/2011 12:47 allizzel777#5
Quote:
Originally Posted by Disconnect View Post
Code:
<form method="get" action="http://www.google.com/search">

<input type="text"   name="q" size="31"
 maxlength="255" value="" />
<input type="hidden"  name="sitesearch"
 value="[COLOR="Red"]mysite.com[/COLOR]" checked />
<input type="submit" value="Google Search" />

</form>
Replace "mysite.com" with whatever site you want Google to search.
its not working for what i need it to work with :( do you think you can use team viewer and help me? but thats exactly what i wanted :)
07/02/2011 13:12 NotEnoughForYou#6
for a search on only your site you need php...your script give the parameter from sitesearch to googel.com
07/02/2011 13:15 allizzel777#7
Quote:
Originally Posted by Disconnect View Post
Code:
<form method="get" action="http://www.google.com/search">

<input type="text"   name="q" size="31"
 maxlength="255" value="" />
<input type="hidden"  name="sitesearch"
 value="[COLOR="Red"]mysite.com[/COLOR]" checked />
<input type="submit" value="Google Search" />

</form>
Replace "mysite.com" with whatever site you want Google to search.
Quote:
Originally Posted by NotEnoughForYou View Post
for a search on only your site you need php...your script give the parameter from sitesearch to googel.com
i have php but disconnect has what i wanted but i cant get it to look like what i want do you think you can use team viewer and help me?
07/02/2011 13:31 NotEnoughForYou#8
has googel a api for this ? cause your script gives this information to googel and they have the php code for search on googel and normaly you need your own php code for your site
07/02/2011 18:27 Fratyr#9
Quote:
Originally Posted by NotEnoughForYou View Post
for a search on only your site you need php...your script give the parameter from sitesearch to googel.com
Man kann auch die jeweilig geöffnete Seite ohne Probleme mit JavaScript auslesen,
und da PHP nicht die einzige Serverseitige Sprache ist stimmt das nicht so ganz (=

With google you can also search on a specified site. just type in the google searchbar
Code:
site:mysite.com searchstring
. connect this with your form and it should
work. but like NotEnoughForYou said a own search api is the best solution.

entschuldigt mein grässliches englisch :D
07/03/2011 12:19 NotEnoughForYou#10
Quote:
Originally Posted by Fratyr View Post
Man kann auch die jeweilig geöffnete Seite ohne Probleme mit JavaScript auslesen,
und da PHP nicht die einzige Serverseitige Sprache ist stimmt das nicht so ganz (=

With google you can also search on a specified site. just type in the google searchbar
Code:
site:mysite.com searchstring
. connect this with your form and it should
work. but like NotEnoughForYou said a own search api is the best solution.

entschuldigt mein grässliches englisch :D
nur js kann man eben auch ausschalten was wiederum eine kleine gruppe von usern ausschließt.

Dass Googel das anbietet wusste ich nicht ;) dann geht es natürlich auch so
07/08/2011 22:57 allizzel777#11
well then can someone use team viewer and help me i really need to get this fixed and my contact form isn't sending an email to my email...



Contact Form:
Code:
<?php
$formMessage = "";
$senderName = "";
$senderEmail = "";
$senderphonenumber = "";
$senderMessage = "";

if ($_POST['username']) { // If the form is trying to post value of username field
 
    // Gather the posted form variables into local PHP variables
    $senderName = $_POST['username'];
    $senderEmail = $_POST['email'];
	$senderphonenumber = $_POST['Phone Number'];
    $senderMessage = $_POST['msg'];
    // Make sure certain vars are present or else we do not send email yet
    if (!$senderName || !$senderEmail || !$senderphonenumber || !$senderMessage) {
 
         $formMessage = "The form is incomplete, please fill in all fields.";
 
    } else { // Here is the section in which the email actually gets sent

        // Run any filtering here
        $senderName = strip_tags($senderName);
        $senderName = stripslashes($senderName);
        $senderEmail = strip_tags($senderEmail);
        $senderEmail = stripslashes($senderEmail);
		$senderphonenumber = strip_tags($senderphonenumber);
		$senderphonenumber = stripslashes($senderphonenumber);
        $senderMessage = strip_tags($senderMessage);
        $senderMessage = stripslashes($senderMessage);
        // End Filtering
        $to = "[Only registered and activated users can see links. Click Here To Register...]";         
        $from = $senderEmail;
        $subject = "You have a message from your website";
        // Begin Email Message Body
        $message = "
        Sender Name: $senderName
		Sender Phone Number: $senderphonenumber
        Sender Email: $senderEmail
		
		Message Start: 
		$senderMessage
        ";
        // Set headers configurations
        $headers  = 'MIME-Version: 1.0' . "\r\n";
        $headers .= "Content-type: text\r\n";
        $headers .= "From: $from\r\n";
        // Mail it now using PHP's mail function
        mail($to, $subject, $message, $headers);
        $formMessage = "Thanks, your message has been sent.";
        $senderName = "";
        $senderEmail = "";
        $senderMessage = "";
    } // close the else condition

} // close if (POST condition
?>
	  <form method="post" name="contact" action="#">
        
                                <label for="username">Name:</label> <input type="text" id="username" name="username" class="input_field" value="<?php echo $senderName; ?>" /> 
<label for="email">Email:</label> <input type="text" id="email" name="email" class="validate-email required input_field" value="<?php echo $senderEmail; ?>" />
                                
                                <label for="phone">Phone:</label> <input type="text" name="phone" id="phone" class="input_field" value="<?php echo $senderPhone; ?>" />
                                <label for="text">Message:</label> <textarea id="msg" name="msg" rows="0" cols="0"><?php echo $senderMessage; ?></textarea>

                                <br />
                                <input type="submit" class="submit_btn" name="submit" id="submit" value="Send" />
                              <input type="reset" class="submit_btn" name="reset" id="reset" value="Reset" />
                            
                            </form>
07/09/2011 10:41 Fratyr#12
You're working on the localhost right? You have to install a mail
server before you can send emails via php.
03/15/2013 23:29 crazyjames#13
Click on my signature for help if u need it :D