Jump to content

Trying to pass 2 values


jjmusicpro

Recommended Posts

I am trying to pass 2 values in the URL, but for some reason they keep combinine to each other...

I wanted to send over the groupid and the zipid, but it keeps sticking them together.

My url when clicked lookslike: http://xxxxxxxxxx.com/editzip.php?groupid=test_account_Pell?zipid=254

 

$acc1="SELECT * from zipcodes WHERE account_name='$groupid_sent' and on_off=1";
$acc2=mysql_query($acc1) or die("Could not select paused clients.");
while($acc3=mysql_fetch_array($acc2)) {
echo "<a href=editzip.php?groupid=$groupid_sent?zipid=$acc3[search_id]>Edit</a> || <a href=deletezip.php?zipid=$acc3[search_id]>Delete</a> - $acc3[zipcode] - $acc3[city] <br>"; 
}

Link to comment
https://forums.phpfreaks.com/topic/71421-trying-to-pass-2-values/
Share on other sites

You are using a question mark to separate them, you need to use (&).

 

<?php

echo "<a href=editzip.php?groupid=$groupid_sent&zipid=$acc3[search_id]>Edit</a> || <a href=deletezip.php?zipid=$acc3[search_id]>Delete</a> - $acc3[zipcode] - $acc3[city] <br>"; 

?>

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.