wright67uk Posted June 17, 2011 Share Posted June 17, 2011 Hi im trying to get name, phone, email, webaddress into POST variables, but only my postcode variable is being carried in my url, can anybody help me please? <?php $subtype = $_GET['subtype']; $subtype = ucwords (strtolower($subtype)); echo "<h1>$subtype</h1>"; $query = "SELECT name, phone, email, WebAddress, postcode FROM business WHERE subtype ='$subtype' AND confirmed ='Yes' ORDER BY name"; if( $result = mysql_query($query) ) { echo mysql_error(); while($row = mysql_fetch_assoc($result) ) { foreach( $row as $k => $v ) { if( empty($v) ) { unset($row[$k]); } } if( !empty($row['postcode']) ) { $row['postcode_link'] = "<p class=link><a href='/gmap.php? phone=" . urlencode($row['phone']) . " &email=" . urlencode($row['email']) . " &webaddress=" . urlencode($row['webaddress']) . " &postcode=" . urlencode($row['postcode']) . "'>Map</a></p><br>"; } echo implode( '<br>', $row); } } ?> Link to comment https://forums.phpfreaks.com/topic/239690-posting-variables-after-using-unset-row/ Share on other sites More sharing options...
xyph Posted June 17, 2011 Share Posted June 17, 2011 The client won't send POST data unless they've submitted a form with the attribute/value method="post" Link to comment https://forums.phpfreaks.com/topic/239690-posting-variables-after-using-unset-row/#findComment-1231267 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.