Jump to content
holy

search

Recommended Posts

Ce vrea nea` Grunt sa zica e sa folosesti XHTML

Toate paginile valide xhtml incep cu :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://w3.org/1999/xhtml">

Micile diferente sunt :

tags-urile se scriu cu minuscule , in html iti permiteai sa scrii INPUT TYPE, aici e mai strict .

toate atributele tags-urilor trebuie sa fie delimitate de ghilimele ,in html puteai avea input type=text value=ceva, aici ai input type="text" value="ceva"

toate tags-urile trebuie inchise , daca nu ai tag de inchidere

ca in cazul input , img , hr ,br ,adaugi un spatiu si slash .

<input type="text" />

<hr />

Oricum asta iti va face doar casuta de cautare , ca sa si functioneze in felul cum vrei tu vei avea nevoie de un script php si probabil o baza de date .

Link to comment
Share on other sites

<html>

<head>

</head>

<body>

<form name="cauta" action="javascript:verifica()">

<input type="text" name="pagina" size="15">

<input type="submit" value="cauta">

</form>

<script language=JavaScript>

function verifica()

{

window.location=document.cauta.pagina.value+".html";

}

</script>

</body>

</html>

sper sa iti fie de folos

Link to comment
Share on other sites

Pagina ta in care sa fie casuta de text :

<form method="POST" action="cauta.php">

<input type="text" name="ce">

<!-- Casuta de introducere --?

<input type="submit" value="Cauta" name="cauta">

</form>

Va trimite catre cauta.php , textul introdus in casuta .

In search.php :

if(isset($_POST['cauta'])) // Daca a fost apasat butonul de submit

{ $query="SELECT * FROM tabel WHERE plm='".$_POST['ce']."'"; // SQL Injection rullz

$int=mysql_query($query); // Interogarea

while($date=mysql_fetch_array($int))

{ // Faci ce vrei cu rezultatul }

}

Ceva de genu . Daca nu sti putin PHP si putin HTML nu o sa reusesti .

Link to comment
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.



×
×
  • Create New...