Jump to content

Guyz I wanna know how to add like this on link


bonty89

Recommended Posts

Oh.

 

I used to wonder a lot about such links too!

 

It's nothing but data posted using GET method. It can be retrived using $_GET[variable]

 

Example:

 

If in a form:

<form method="GET" action="url.php">

...

...

<input type="text" name="email">

...</form>

 

would submit /[email protected]

 

on URL.php, we'd then be able to use this email, like

 

print $_GET;

 

For any help you may msg. me.

 

Hope it helps

Akshay

guyz

 

I wanna know how set variable on the Index.php file

 

eg: when user click to login

it should display like this

http://www.anywebsite.org/index.php?action=login

 

similar to this forum  profile link

http://www.phpfreaks.com/forums/index.php?action=profile

search

http://www.phpfreaks.com/forums/index.php?action=search

 

how to write like that

this URL: http://www.anywebsite.org/index.php?action=login is just using the GET method to pass the values to index.php

 

if you have a HTML file like:

<html><head><title>test</title></head><body>
<form method="GET" action="index.php">
<input type="hidden" name="action" value="login"/>
<input type="submit" value="Login"/>
</form>
</body></html>

 

Then when you press "Login" button, you will be directly to index.php with variable 'action' passed using method 'GET' and value of 'action' will be a string: 'login'.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.