Simple PHP Form Issue

NamecheapNamecheap
Watch

buddybuddha

Established Member
Impact
2
This situation is probably fueled by my intense lack of knowledge of php.

But I have a script being called by:

read.php?blog=mainBlog;id=1

The script contains only the following code.

Code:
<?

$blog = $_GET['blog'];

echo $blog;

?>

Why does it return 'mainBlog;id=1' and not 'mainBlog'?

Thanks.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
On most servers, & seperates two variables, not ;

However, GET is an array, so it's only showing the first element in the array (i.e. the first variable.)
 
0
•••
thanks changing ; to & solved it!
 
0
•••
Ah okay good. Lol Ignore the second part of my reply :)
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
CatchedCatched

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back