Jump to content

Recrutăm designeri audio și video. Aplicați aici

Recrutăm designeri grafici. Aplicați aici

 

Search the Community

Showing results for tags 'code'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • B-Zone
    • Announcements
    • Community
    • Market
    • Questions and Answers
  • San Andreas Multiplayer
    • RPG.B-Zone.Ro:7777 Roleplay
    • RPG2.B-Zone.Ro:7777 Roleplay
    • Server and Website Suggestions
    • Wiki Website
  • B-Zone Online
    • B-Zone Championships
    • B-Zone Clans & Clubs
    • B-Zone Clips
    • B-Zone Radios
    • Counter-Strike 1.6
    • Counter-Strike: Global Offensive
    • Discord
    • Metin2
    • Minecraft
  • IT Zone
    • Design
    • Gadgets
    • Programming
    • Software & Hardware
    • Video Games
  • Real life
    • Entertainment
    • History
    • Juridic
    • Lifestyle
    • Politics
    • Sport
    • Vehicles
  • Trash Can
    • Trash Can
  • Very Important Person [VIP] - RPG1's [VIP] - Topic

Product Groups

There are no results to display.

Categories

  • MODURI
    • CLEO/SAMPFUNCS
    • Vehicles
    • Skins
    • Sounds
    • Effects
    • Weapons
    • Others
    • Modpacks

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Steam ID


Discord


Instagram


Location


Hobbies


Real name


RPG1 Nickname


RPG2 Nickname


CS 1.6 Nickname

Found 10 results

  1. Salutare prieteni, am revenit cu o continuare la primul tutorial in care aratam cum sa conectam baza de date in PHP si sa afisam date in pagina. Astazi o sa va arat cum sa adaugam functia de search care afiseaza rezultate in aceeasi pagina PHP. Pentru a putea intelege corect tot tutorialul de astazi, va rog sa aruncati o geana peste acest tutorial: Adaugarea functiei search si afisarea datelor in aceeasi pagina. Dupa ce baza de date este conectata iar pagina index.php afiseaza datele din baza de date adaugam in mai sus de codul PHP un cod HTML care arata cam asa: <form action="index.php" method="post"> <input type="text" name="search" /> <input type="submit" value="Search" /></form> Ce face acest cod mai exact, face un textbox in care noi putem sa adaugam niste valori iar cand apasam butonul, el prin metoda post ne paseaza valorile catre functia %searchq% pe care o sa o definim si o folosim mai departe in codul MySQL. Pagina initiala trebuie sa arate cam asa, inainte de adaugarea codului HTML pentru search: De la acest cod de baza(Codul este explicat parca in celalalt tutorial) care doar afiseaza niste date in pagina incepem sa lucram mai departe pentru functia search: <?php require_once "config.php"; ?> <form action="index.php" method="post"> <input type="text" name="search" /> <input type="submit" value="Search" /></form> <section id="content"> <?php $q = mysqli_query($link, "SELECT * FROM comments Order by `id` desc LIMIT 5600"); while($row = mysqli_fetch_array($q)) { ?> <h5>User: <?= $row["nume"]; ?> <small> Ora: <?= $row["ora"]; ?></small></h5> <?= $row["text"]; ?> <p> <br> </p> <?php } ?> </section> Dupa adaugarea codului, pagina trebuie sa arate cam asa: Primul pas este deja facut, am adaugat codul HTML care ne paseaza valorile, urmeaza sa facem o conditie(IF), care spune asa: Daca functia search nu este atinsa, afiseaza toate datele, daca functia search este atinsa, afiseaza doar datele care sunt asemanatoare cu valorile din %searchq%. Tot ce trebuie sa facem este sa copiem partea de cod care deja ne afiseaza datele in MySQL si sa o adaptam conditiei conform cerintelor noastre. <?php require_once "config.php"; ?> <form action="index.php" method="post"> <input type="text" name="search" /> <input type="submit" value="Search" /></form> <section id="content"> <?php if(isset($_POST['search'])) { $searchq = $_POST['search']; $q = mysqli_query($link, "SELECT * FROM comments WHERE `nume` LIKE '%$searchq%' OR `text` LIKE '%$searchq%' OR `ora` LIKE '%$searchq%' Order by `id` desc"); while($row = mysqli_fetch_array($q)) { ?> <h5>User: <?= $row["nume"]; ?> <small> Ora: <?= $row["ora"]; ?></small></h5> <?= $row["text"]; ?> <p> <br> </p> <?php } } else { $q = mysqli_query($link, "SELECT * FROM comments Order by `id` desc LIMIT 5600"); while($row = mysqli_fetch_array($q)) { ?> <h5>User: <?= $row["nume"]; ?> <small> Ora: <?= $row["ora"]; ?></small></h5> <?= $row["text"]; ?> <p> <br> </p> <?php } } ?> </section> Dupa adaugarea conditiei, cam asa trebuie sa functioneze codul: Si practic cam asta este toata vrajeala, totul tine de o conditie care afiseaza doar datele relevante cautarii noastre. Daca aveti intrebari, astept PM pe forum, comentarii sau mesaje pe discord: GhOsT_x#6329 sau b-zone.ro/discord.
  2. Romana English
  3. Romana English
  4. Romana English
  5. Romana English
  6. RO : De 1 Septembrie, echipa B-Zone sarbatoreste impreuna cu membrii comunitatii cei 4 ani de la infiintarea B-Zone. Pe data de 1 Septembrie la ora 13:00 (ora Romaniei) se va tine un event la care sunteti invitatii cu totii pe serverul B-Zone : RPG. Va asteptam sa sarbatorim intr-un mod unic. Cu aceasta ocazie, puteti utiliza codul promo : "BDAY2012" (fara ghilimele) pentru a beneficia de o reducere de 25% la orice produs de pe http://clienti.b-zone.ro/cart.php . Acest cod poate fi folosit in perioada 1 Septembrie 2012 00:00 - 10 Septembrie 2012 24:00 . Comenzile realizate in aceasta perioada pot fi achitate pana pe data de 15 septembrie 2012, inclusiv. Cum se utilizeaza? Comanda acum Detalii despre plata. Contact EN : By comming of 1st of September, B-Zone's Staff celebrates together with the community members 4 years since B-Zone was founded. On the 1st of September at 13:00 (Romania time) there will be an event at which everybody is invited on the B-Zone RPG server. We wait for all of you to celebrate in an unique way. With this event, tou can use the promo code : "BDAY2012" (without quotes) in order to receive a 25% free discount when you order a new product from http://clienti.b-zone.ro/cart.php . This code could be used from September 1 2012 00:00 to September 10 2012 24:00 . Orders made ​​in this period of time can be paid up until September 15, 2012, inclusive. How to use it? Order now How to pay Contact
  7. RO : De 1 iunie, echipa B-Zone ureaza la multi ani atat copiilor, cat si celor ce inca traiesc intr-un mod distractiv, ludic. Cu aceasta ocazie, puteti utiliza codul promo : "CHILD" (fara ghilimele) pentru a beneficia de o reducere de 25% la orice produs de pe http://clienti.b-zone.ro/cart.php . Acest cod poate fi folosit in perioada 1 iunie 2012 00:00 - 4 iunie 2012 24:00 . Comenzile realizate in aceasta perioada pot fi achitate pana pe data de 8 iunie 2012, inclusiv. De asemenea, avem un nou produs : Vehicle hidden color. Acesta costa 3 euro(permanent) si il puteti achizitiona dinhttp://clienti.b-zone.ro/cart.php . Cum se utilizeaza? Comanda acum Detalii despre plata. Contact EN : By comming of 1 June, B-Zone's Staff wishes happy birthday to children and everybody who is still a child. You can use the promo code : "CHILD" (without quotes) in order to receive a 25% free discount when you order a new product from http://clienti.b-zone.ro/cart.php . This code could be used from 1st june 2012 00:00 to 4th June 2012 24:00 . Orders made ​​in this period of time can be paid up until June 8, 2012, inclusive. We have a new product : Vehicle hidden color. You can find it on http://clienti.b-zone.ro/cart.php and it costs 3 euro(permanent). How to use it? Order now How to pay Contact
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.