/    Sign up×
Community /Pin to ProfileBookmark

Sending values through URL

Can i send more than one value through the url

Sending them im doing this

[code=php]<a href=”deletecomment.php?fileId=<?php echo “$blobId”; ?>?userid=<?php echo $row[“Username”]; ?>”>[/code]

And getting the values like this

[code=php]
$user = $_GET[‘userid’];

$blobid = $_GET[‘fileId’];

[/code]

but i get this error

[quote]

Notice: Undefined index: userid in c:program fileseasyphp1-8wwwnew folderdeletecomment.php on line 9

[/quote]

the values appear in the url as so

[quote]

deletecomment.php?fileId=143?userid=paul

[/quote]

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@TaschenApr 09.2007 — deletecomment.php?fileId=143?userid=paul

should be

deletecomment.php?fileId=143&userid=paul

the ? starts the query if you like, while the ampersand joins several key var pairs
×

Success!

Help @Marcus_Maximus spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...