usresolve Posted February 21, 2007 Share Posted February 21, 2007 I've been banging my head against the wall trying to figure out why I can't get get/post values. I'm kinda new at PHP so all help is appreciated. TRhe only vars I get are in the url string: edit=meta&dometa=TRUE <p><b>Edit:</b> <a href="<? echo $thispage; ?>?edit=meta">Edit Meta Tags</a> | <a href="<? echo $thispage; ?>?edit=categories">Edit Categories</a> | <a href="<? echo $thispage; ?>?edit=content">Edit Content</a><br/> <b>Add:</b> <a href="<? echo $thispage; ?>?add=meta">Add Meta Tags</a> | <a href="<? echo $thispage; ?>?add=categories">Add Categories</a> | <a href="<? echo $thispage; ?>?add=content">Add Content</a><br/> <b>Delete:</b> <a href="<? echo $thispage; ?>?del=meta">Delete Meta Tags</a> | <a href="<? echo $thispage; ?>?del=categories">Delete Categories</a> | <a href="<? echo $thispage; ?>?del=content">Delete Content</a></p> </div> <? if ($edit == "meta") { $query_edit_meta = "SELECT * FROM meta"; $edit_meta = mysql_query($query_edit_meta, $connect) or die(mysql_error()); $row_edit_meta = mysql_fetch_assoc($edit_meta); $totalRows_edit_meta = mysql_num_rows($edit_meta); if ($totalRows_edit_meta > 1) { ?> <form action="<? echo $thispage; ?>?edit=meta&dometa=TRUE" method="POST" enctype="text/plain" name="getmeta"> <table width="400"> <tr> <td>ID</td> <td>Title</td> <td>KW</td> <td>DESC</td> <td>Content ID</td> </tr> <? do { $tr = "<tr>\n"; $tr .= "<td><input type=\"radio\" value=\"".$row_edit_meta['id']."\" name=\"edit_this_meta\" />".$row_edit_meta['id']."</td>\n"; $tr .= "<td>".$row_edit_meta['title']."</td>\n"; $tr .= "<td>".$row_edit_meta['keywords']."</td>\n"; $tr .= "<td>".$row_edit_meta['description']."</td>\n"; $tr .= "<td>".$row_edit_meta['content_id']."</td>\n"; $tr .= "</tr>\n"; echo $tr; } while ($row_edit_meta = mysql_fetch_assoc($edit_meta)); ?> </table> <input name="Submit" type="submit" value="Submit"> </form> <? } if (isset($edit_this_meta)) { echo "edit this meta: ".$_POST['edit_this_meta']; //phpinfo(); } else { echo "Nothing to edit. <a href=\"javascript:history.go(-1)\">Back</a>"; } } Link to comment https://forums.phpfreaks.com/topic/39484-help-with-getpost-problem/ Share on other sites More sharing options...
craygo Posted February 21, 2007 Share Posted February 21, 2007 If register globals is off, which it is by default, you cannot get the edit with just $edit. you have to assign it $edit = $_GET['edit']; now $edit will equal "meta" Ray Link to comment https://forums.phpfreaks.com/topic/39484-help-with-getpost-problem/#findComment-190505 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.