Results 1 to 25 of 36
Thread: $_GET
Hybrid View
-
24th June 2010 06:25 #1
$_GET
, POST GE. online POST , 10- ot url. . url-, G - .
GET, url-. GET url-to, , url url?
online users:
2 . GET ?<?php
require ('/online_results.php');
function online()
{
if(isset($_SESSION['user']))
{
$online=new sitesession();
$online->connect();
$query="select uid,user,name,namelast,city,university,m ail from user where status='y'";
$result=mysql_query($query);
if($result)
{
$row=mysql_fetch_array($result, MYSQL_ASSOC);
echo '<div style="position:absolute;margin-left:10px;margin-top:250px;border:0px solid #000000;height:auto;width:642px;">';
$i=1;
$h=1;
$w=400;
$l=260;
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
if($l==1060)
{
$l=260;
$h=$h+150;
}
printf('<div style="position:absolute;margin-left:'.$l.'px;padding:0px;margin-top:'.$h.'px;width:'.$w.'px;border:1px solid #211f1f;background-color:#2e2d2d;height:150px;"><table border=0>
<tr><td>   </td><td>   </td><td>   </td><td>   </td><td>   </td></tr>
<tr><td>ID :</td><td>   </td><td>%s</td>
<td>      </td>
<td>       & nbsp :</td>
<td>   </td><td><center>%s</center></td></tr><tr><td>     &nbs p</td>
<td>      </td><td>      </td><td>      </td>
<td>    E-mail: </td><td>   </td><td>%s</td></tr>
<tr><td>   </td><td>   </td><td>   </td><td>   </td><td>   </td></tr>
<tr><td>   </td><td>   </td><td>   </td><td colspan=5><center> </center></td><td>   </td><td>   </td><td>   </td></tr></table></div>', $row["uid"], $row["user"], $row["mail"]);
$l=$l+400;
$i++;
}
mysql_free_result($result);
echo '</div>';
}
}
else if(!isset($_SESSION['user']))
{
echo '<div style="position:absolute;margin-left:0px;margin-top:0px;"> !</div>';
}
}
?>Last edited by XcArm; 24th June 2010 at 06:44.
-
24th June 2010 09:43 #2
, . .
, <form method="get" ... .
url $page = $_GET['page'], .
( , ) LIMIT $page,20
$page = 0;
if (isset($_GET['page'])) {
$page = (integer)$_GET['page'];
$page--;
if ($page<0) $page = 0;
}
-
24th June 2010 10:01 #3
: http ://hardwarebg.com/forum/showthread.php?p=2402389
url p, 2402389
( showthread.php ) $count=$_GET['p'];
, , p , a form. &
: http ://hardwarebg.com/forum/showthread.php?p=2402389&t=123456. HWBG !
-
24th June 2010 11:53 #4
, , GET ?
tedych: . sql injection-, .
Nuclear: , .Last edited by XcArm; 24th June 2010 at 12:04.
-
24th June 2010 12:08 #5
( ) GET ? - URL-o, , Nuclear.
EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
24th June 2010 12:23 #6
online.php url-to, localhost/online.php url- . GET.., nuclear GET , GET . :
$query="select uid,user from user";
$result=mysql_query($query);
if(!$result)
{
echo 'Error'.mysql_error();
}
$num=mysql_num_rows($result);
$array=mysql_fetch_array($result,MYSQL_A SSOC);
for(i=0;$i<=$num;$i++)
{
echo stripslashes($array['uid']).' '.stripslashes($array['user']);
}
, post get, GET ....
GET..
, array $_GET :
stripslashes($_GET($array['user'])); GET...
.: , , , GET . , GET ...
Last edited by XcArm; 24th June 2010 at 12:48.
-
24th June 2010 14:13 #7
Ka GET ?
, mysql GET ?
- user. get
$user=stripslashes($array['user']);
/, .
:
echo "<a href=\"http://yoursite.com/checkdata.php?username=$user></a>".
GET checkdata.php
$user=$_GET['username'].Last edited by Nuclear; 24th June 2010 at 14:22.
. HWBG !
-
24th June 2010 14:22 #8
, , (checkdata.php) URL, , . JavaScript, - .
. GET , , .
..
.
POST GET , ( HTTP ()) .Last edited by Bombera; 24th June 2010 at 14:32.
EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
24th June 2010 15:05 #9
-
24th June 2010 19:21 #10
.php :
, , url. , , POST, GET .$connect=mysql_pconnect('localhost','use r','pass') or die(echo 'Error'.mysql_error());
$db=mysql_select_db('site');
$query="select uid,user from user";
$result=mysql_query($query);
if(!$result)
{
echo 'Error'.mysql_error();
}
$num=mysql_num_rows($result);
$array=mysql_fetch_array($result,MYSQL_A SSOC);
for(i=0;$i<=$num;$i++)
{
echo stripslashes($array['uid']).' '.stripslashes($array['user']);
}
.: , POST, . , url. get ...
, Help. ,
get , - localhost/online.php
localhost/online.php?t=...
.. GET .Last edited by XcArm; 24th June 2010 at 19:53.
-
24th June 2010 20:05 #11
:
?
?
POST GET . GET , . T.e, o .
page ($_GET['page']). 50 , (page=0) 1 50, - 51 100 ..
page , .
/ . - , . , , online.php? ( page=0, set- Page), nline.php?page=1 ... .Code:$i=0; $page=$_GET['page']; while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { if ($i<($page+1)*20 && $i>$page*20) printf("ID: %s Name: %s", $row["id"], $row["name"]); $i++; }
, - ( ($result) $i ).Last edited by Nuclear; 24th June 2010 at 20:14.
. HWBG !
-
24th June 2010 20:31 #12
, , $_GET['page'] SQL , 20 ( 50) , , mysql LIMIT $page, 50.
GET , POST .. ,
.
" get ..."
- A, "" .
" get " . "get ".
get , URL. POST , POST Http .Last edited by tedych; 24th June 2010 at 20:36.
-
24th June 2010 20:58 #13
, $_GET['page'] - post , , url e get $_get['page']. post get, online.php online.php?page=1 online.php?page=10, url- online.php , , !
, Url- ? get url
-
24th June 2010 21:29 #14Registered User
Join Date: Feb:2006
Location: Plovdiv
Posts: 392
, . " "
-
24th June 2010 22:57 #15
-
27th June 2010 14:27 #16
-
28th June 2010 01:09 #17
, ...
:
: users.php
SQL- , , .
, , , .
:
, x y. x y , . $x = 5; $y = 9; SQL- limit, $x, $y.
.
:
. $x = $_GET['a']; $y = $_GET['b'];. .
users.php?a=5&b=9.
, , , , , , .. , .
.
- .
...Last edited by Flower; 28th June 2010 at 01:15.
-
28th June 2010 03:15 #18
-
28th June 2010 13:14 #19
Flower: 10x , GET
... GET, url
vbTheKing:
..... , ... POST GET php, ! MYSQL?? mysql-a, , ??
.: , , GET (. html $_GET ), $_GET['page'] . GET GET , html ...., , GET, GET (. select user,city from user where user like 'pesho'; - Url - localhost/online.php?user=pesho&&city=ruse).... , ..
, url-to, ...
? , page $_GET , GET? ... ...Last edited by XcArm; 28th June 2010 at 13:58.
-
28th June 2010 13:56 #20
!
"GET ".
.
/ .
, web-.
:
1. http- - ( ).
- .
, - . : , , , .
- , . , , , ..
GET POST , . , .
2. - . , . ( , ) - . php. , , . , , , . php , GET POST php- $_GET $_POST. php-.
3. php -. $_GET $_POST . , , " -". , .
php "" $_GET $_POST . , , , .
, , php - , web-, ... . SQL- MySQL. , , php . . . -. , . GET POST - . " 5 9" .
php . , , , , $_GET , .
, php . html. - . .
. , . .Last edited by Flower; 28th June 2010 at 15:02.
-
28th June 2010 13:59 #21
, - , ?!
: , .
, , . , , GET/POST/Mysql, N- ?
vbTheKing ,
. , ...
. , , , , .
" GET"
- . .
" url "
- url ? url_encode, url_decode ? ?!
" MYSQL?? "
- . "" , - , .
" mysql-a, , ??"
- ? . GET , ?? , web request, GET/POST, (SQL ). GET/POST mysql .
.
-
28th June 2010 14:16 #22
, , - get post , localhost/online.php?user=pesho&&city=ruse :
connect=mysql_pconnect('localhost','use r','pass') or die(echo 'Error'.mysql_error());
$db=mysql_select_db('site');
$query="select uid,user from user";
$result=mysql_query($query);
if(!$result)
{
echo 'Error'.mysql_error();
}
$num=mysql_num_rows($result);
$array=mysql_fetch_array($result,MYSQL_A SSOC);
for(i=0;$i<=$num;$i++)
{
echo stripslashes($array['uid']).' '.stripslashes($array['user']);
}
---------- 14:16 ---------- 14:07 ----------
, , , http request- url, , url, ,
GET ...
-
28th June 2010 14:21 #23
,
.
" http request- ur"
" url, ,"
" GET ... "
-
28th June 2010 14:32 #24
, , ...., ? get !!!!!!! ,
---------- 14:32 ---------- 14:27 ----------
Flower: ,get post, get? , ?3. php -. $_GET $_POST . , , " -". , .
php "" $_GET $_POST . , , , .
-
28th June 2010 14:42 #25




Reply With Quote

...

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in