Jump to content
gaby

Search Form In Html

Recommended Posts

<html>
<head>
<title>PC Troubleshooting Search Form</title>
<style type="text/css">
body {
background-image: url("background.png");
}
img {
float: left;
}
</style>
</head>
<body><br>
<form action="http://www.google.ro/search" method="get"><img src="search.gif" mce_src="search.gif">
<input type="text" name="q">
<input type="submit" value="Search">
</form>
</body>
</html>[/html]

[color=red][b]Imaginile necesare:[/b][/color]

[b]search.gif[/b]

searchsn6.gif

[b]background.png[/b]

backgroundlc6.png

Search form-ul final va arata asa:

finalqy4.gif

Share this post


Link to post
Share on other sites

Salut Gaby am o intrebare Am pus search form pe websiteul meu si cind doresc sa caut ceva nu se duce la ceea ce am scris dar se duce pe pagina principala

<form id="searchform" name="searchform" method="get" action="http://vicolaspetru.host22.com">

<div>

<label for="s"></label>

<input type="search" id="s" name="s" />

<input type="submit" id="searchsubmit" value="Search" />

</div>

</form>

Intra pe WebSite-ul meu si vezi daca poti gasi care-i problema.

Share this post


Link to post
Share on other sites

Salut,

Atat timp cat site-ul este static (foloseste doar HTML) este imposibil sa beneficiezi de propriul search form, care sa caute pe site-ul tau. De ce ? Pentru ca pentru asta ai avea nevoie de o baza de date prin intermediul careia sa se efectueze cautarile, si implicit de php (site dinamic); deci nu html, in cazul tau.

Totusi, poti lasa codul din primul post intact, si vei beneficia de un search form, dar nu propriu, ci care va folosi engine-ul Google, sau, arunca un ochi pe aici pentru a vedea si alte posibilitati:

Share this post


Link to post
Share on other sites

Pentru a crea o baza de date (o poti crea din phpmyadmin -> MySql) este necesar sa automatizezi putin procesele, asta inseamna sa faci site-ul dinamic (in loc de HTML sa folosesti PHP). Vezi: si http://jalobean.itim-cj.ro/Cursuri/phpmysql/index.html

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...