Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Problemik ze skryptam
Forum PHP.pl > Forum > Gotowe rozwiązania
raf2001
Mam problemik ze skryptem:
[php:1:bd7de86e03]<?php
$page = $_REQUEST['page'];
$query = $_POST['query'];

// check to see if $page is set
if (!$page) {
$page = 1;
}
// Change $query to a request super global after the first page.
if($page > 1){
$query = $_REQUEST['query'];
}
//set up some limits
$limit = $page * 10;
$limit = $limit - 10;
//get the count from the database table
$sql_num = mysql_query("SELECT * FROM $table_dane");
$num = mysql_num_rows($sql_num);
// query your database for the final results
$sql_results = mysql_query("SELECT * FROM $table_dane LIMIT $limit,10 ORDER BY rid ASC");
if($num < 10){
$through = $num;
} else {
$through = $limit + 10;
}
if ($through > $num){
$through = $total;
}
if($page > 1){
$from = $limit +1;
} else {
$from = $limit;
}
if($from == 0){
$from = $from +1;
}
echo "Wszyscy zarejestrowani Użytkownicy:";
echo "<table border=0>
<tr>
<td>| ID |</td>
<td>| Imię |</td>
<td>| Nazwisko |</td>
<td>| E-mail |</td>
</tr>";
if ($page > 1) {
echo "<a href="$PHP_SELF?query=$query&page=".($page -1).""><< poprzednia</a>&nbsp;&nbsp;";
}
if (($num > 10) && (($limit + 10) < $num)) {
echo "<a href="$PHP_SELF?query=$query&page=".($page +1)."">następna >></a>";
}
// while(list($results)=mysql_fetch_array($sql_results)){
while ($row = mysql_fetch_array($sql_results)) {
$rid = $row["rid"];
$rimie = $row["rimie"];
$rnazwisko = $row["rnazwisko"];
$remail = $row["remail"];
echo "<tr>
<td>$rid</a></td>
<td>$rimie</a></td>
<td>$rnazwisko</a></td>
<td><a href=mailto:$remail>$remail</a></td>
</tr>";
}
if ($page > 1) {
echo "<a href="$PHP_SELF?query=$query&page=".($page -1).""><< poprzednia</a>&nbsp;&nbsp;";
}
if (($num > 10) && (($limit + 10) < $num)) {
echo "<a href="$PHP_SELF?query=$query&page=".($page +1)."">następna >></a>";
}
echo "</table>";

?>[/php:1:bd7de86e03]
otóż niewyświetla mi on nic. Czemu? jaki błąd?
hwao
Przeniesione:
php pocz -> Skrypty php
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2024 Invision Power Services, Inc.