Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Dodawanie treści po id w bazie
Jasioo
post 9.03.2014, 11:26:50
Post #1





Grupa: Zarejestrowani
Postów: 15
Pomógł: 0
Dołączył: 5.03.2014

Ostrzeżenie: (0%)
-----


Witam mam pewien problem, mianowicie chodzi o to iż mam takie coś:

  1. define('ILOSC_WYNIK', 3);
  2.  
  3.  
  4. include('admin/baza.php');
  5.  
  6.  
  7. $SQL = "SELECT *
  8. FROM ".$prefix."czesci order by id desc
  9. LIMIT ".mysql_escape_string((int)$_GET['next']*ILOSC_WYNIK).",".ILOSC_WYNIK;
  10.  
  11.  
  12.  
  13. $dane5 = mysql_query($SQL);
  14. while($r = mysql_fetch_assoc($dane5)) {
  15. echo '<div style="display: inline; margin-right: 10px;" original-title=" '.stripslashes($r['nazwa']).' <br>Cena: '.stripslashes($r['koszt']).' zł " class="best tip">';
  16. echo '<form action="kupuje.php" style="display: inline;"><input type="hidden" name="ID" value='.stripslashes($r['ID']).'/>';
  17. echo '<input type="image" style="height: 30%; margin-top: 25px; width: 30%; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 3px;" src="'.$r['img'].'" value="submit" onfocus="blur()"/></form>';
  18. echo '</div>';
  19.  
  20. }



dokładniej chodzi o te linijki :

  1. <form action="kupuje.php" style="display: inline;"><input type="hidden" name="ID" value='.stripslashes($r['ID']).'/>';
  2. echo '<input type="image" style="height: 30%; margin-top: 25px; width: 30%; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 3px;" src="'.$r['img'].'" value="submit" onfocus="blur()"/></form>


wchodząc w jakiś link mam takie coś : kupuje.php?ID=74%2F&x=25&y=59

chcialbym aby link przenosił do usługi o danym id i pokazywało to w taki sposób:

  1. echo '<div class="wszyst4">';
  2. echo '<div class="post_toolbar4" style="height: 650px;">';
  3. echo '<div style="float: left; margin-left: 20px; margin-right: 20px;">';
  4. echo '<?php print(stripslashes($nazwa)); ?><hr /></p>';
  5. echo '<p style="font-size: 70%">Opis: </br></p>';
  6. echo '<Img style="display: inline; float: left; margin-left: 100px;" src="<?php print(stripslashes($img)); ?>">';
  7. echo '<p style="font-size: 60% float: right; display: inline; margin-right: 100px;">'; print(stripslashes($opis)); echo '</p>';
  8. echo '</br></br>';
  9. echo '<form action="#" method="POST">';
  10. echo '<input type="hidden" name="ID" value="<? print_r($id) ?>"></br>';
  11. echo '<input style="width: 120px; height: 50px" type="submit" value="Kup!" name="buy"/></br></br>';


Pytanie brzmi jak to połączyć, aby to działało jak opisałem ?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 18.07.2025 - 02:50