Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Problemik ze skryptam
raf2001
post
Post #1





Grupa: Zarejestrowani
Postów: 116
Pomógł: 0
Dołączył: 14.06.2002
Skąd: Żyrardów

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


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?


--------------------
Go to the top of the page
+Quote Post
hwao
post
Post #2


Developer


Grupa: Moderatorzy
Postów: 2 844
Pomógł: 20
Dołączył: 25.11.2003
Skąd: Olkusz




Przeniesione:
php pocz -> Skrypty php
Go to the top of the page
+Quote Post

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 Aktualny czas: 20.08.2025 - 19:23