MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides

Homepage Register FAQ Members Mark Forums Read Advertise Marketplace FPSowned


Go Back   MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides > Programming > Server side > PHP
Reload this Page REAL [Beginner] Using GET method
PHP Discussions about PHP

Reply
 
LinkBack Thread Tools
REAL [Beginner] Using GET method
(#1)
Old
Gizzer is Offline
Site Donator
Rep Power: 1
Reputation: 15
Gizzer is on a distinguished road
 
Posts: 197
Join Date: Nov 2007
REAL [Beginner] Using GET method - 03-18-2008

I did look at that other post and there were a few questions unanswered and answers that were rubbish.


The

$_Get is useful for passing data from one page to another in the URL bar. It means that you do not need a form. I myself use the GET when making pages display certain info.

Quote:
Originally Posted by warsheep View Post
Its an good tutorial, BUT,
how do people create index.php?thinghere ?

But, the tutorial itself is good!


I will have a hyperlink.

<a herf=www.mmowned.com/Index.php?step=exploits>Exploits Section</a>

The next page you go onto ...


<?php
//This is used when clicking a hyperlink to display certain pieces of data

if $_GET['step'] == exploits {

will display some crap

}

?>





If you want to put a variable at the end. Lets say you are listing a database of people and when you click on someones name it sends you to their profile with some data on it ...


<a href=profiles.com/profile.php?profileID=$Users_ID>$Users_Name's Profile</a>

If you are listing everyones names from the database onto a page you would make an SQL query that loops and each time selects one person, pulls out their ID and Name then puts it into the hyperlink as above.

So lets say I am ID 1 in database ... the URL will end up
profiles.com/profile.php?profileID=1


Now you use the $_GET to list the users profile.

<?php

User_ID=$_GET['profileID'];

//Sql query which calls all the data for that User_ID here

$User_Name
$User_Address
$User etc ...

?>


When I first started PHP coding I didn't know any of this. My first project I made a browser based game. For it I made it display all the names of the signed up people and allowed them to make their one profiles. When I first thought about it, I thought "WOW so I am going to have to make a new page for each users profile? :s". Then I realise I could use the GET to call an ID, which I could use to call certain pieces of data from the database. Meaning I only had 1 page.

I felt like a fool when I worked this out but its easy stuff.

If you are using data like Username/Passwordy type of things you dont really want it coming up in the URL. Use $_POST for those situations


If you have any questions post below. It is like 3:30AM here so I am very tierd and may of not expliained it properly, or used wrong grammar and confuzed the hell out of you.
Reply With Quote

Donate to remove ads.
(#2)
Old
tttommeke is Offline
Banned
Rep Power: 0
Reputation: 1
tttommeke is a name known to all
 
Posts: 632
Join Date: Jul 2007
03-19-2008

<?php
//This is used when clicking a hyperlink to display certain pieces of data

if $_GET['step'] == exploits {

will display some crap

}

?>

Yhea...

<?php
//This is used when clicking a hyperlink to display certain pieces of data

if $_GET['step'] == "exploits" {

Code to execute

}

?>

you forgot the " "
Reply With Quote
(#3)
Old
Gizzer is Offline
Site Donator
Rep Power: 1
Reputation: 15
Gizzer is on a distinguished road
 
Posts: 197
Join Date: Nov 2007
03-19-2008

No I didnt It work work both ways


6 rep to -1
Matt linking post in sbawx.. could've been -25 rep, read the rules
Reply With Quote
(#4)
Old
warsheep is Offline
Contributor
Rep Power: 3
Reputation: 183
warsheep has a spectacular aura aboutwarsheep has a spectacular aura about
 
Posts: 1,144
Join Date: Sep 2006
03-20-2008

Thanks, it might have some flaws, but I learned what I needed.


<ToXiCa> warsheep + denmark + VIP lounge + cheese = love <3
FOR A MOMENT, NOTHING HAPPENED. THEN, AFTER A SECOND OR SO, NOTHING CONTINUED TO HAPPEN.
Reply With Quote
(#5)
Old
Dreadvizzle's Avatar
Dreadvizzle is Offline
Site Donator
Rep Power: 2
Reputation: 19
Dreadvizzle is on a distinguished road
 
Posts: 77
Join Date: Dec 2006
05-04-2008


the normal way to do this would be



<?php

if $_REQUEST['step'] == exploits {

will display some crap

}


My staff is a good one!
-Kralnor


Last edited by Dreadvizzle; 05-04-2008 at 09:24 PM.
Reply With Quote
(#6)
Old
Lucani is Offline
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 1
Reputation: 1
Lucani is an unknown quantity at this point
 
Posts: 15
Join Date: May 2008
05-07-2008

if i want use POST method i can write it in similar way or i have to change something in form ?
Reply With Quote
(#7)
Old
Dark Soul's Avatar
Dark Soul is Offline
Contributor
Rep Power: 1
Reputation: 104
Dark Soul will become famous soon enoughDark Soul will become famous soon enough
 
Posts: 710
Join Date: Dec 2007
Location: Ascent Black Box
05-07-2008

<?php
if $_REQUEST['forum'] == "5" {
header('location:[Only registered and activated users can see links. ]')
}

Out come: http://www.mmowned.com/index.php?forum=5 -> http://www.mmowned.com/forums/exploits

That's what you really want if you are going to redirect to a different page.




Everybody lies.
Reply With Quote
Reply

Donate to remove ads.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On




Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327