mourningreign Posted March 15, 2006 Share Posted March 15, 2006 Maybe I've been looking at it too long. I just want it to add[code] picture=$_POST['picture'] [/code]after the ? it is already adding to the URL.[code]$editFormAction = $_SERVER['PHP_SELF'];if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);}if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO cmsarticles (title, tagline, author, picture, `section`, thearticle, approved) VALUES (%s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['title'], "text"), GetSQLValueString($_POST['tagline'], "text"), GetSQLValueString($_POST['author'], "text"), GetSQLValueString($_POST['picture'], "text"), GetSQLValueString($_POST['section'], "int"), GetSQLValueString($_POST['thearticle'], "text"), GetSQLValueString($_POST['approved'], "text")); mysql_select_db($database_core, $core); $Result1 = mysql_query($insertSQL, $core) or die(mysql_error()); $insertGoTo = "pictureupload.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo));}[/code]It's times like these when I realize what a PHP beginner I am! So much for patting myself on the back...Rage Link to comment https://forums.phpfreaks.com/topic/5003-adding-form-value-to-url/ Share on other sites More sharing options...
cunoodle2 Posted March 15, 2006 Share Posted March 15, 2006 Is this what you are trying to do?[code]<?phpif (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?".$_POST['picture'];}?>[/code] Link to comment https://forums.phpfreaks.com/topic/5003-adding-form-value-to-url/#findComment-17700 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.