anner Posted August 3, 2006 Share Posted August 3, 2006 I'm trying to convert my old perl frames site into my new PHP CMS. All in all, it's working quite well. I don't have time to recode it all right now, so I'm using include to run my perl functions. Most of the time this is working fine. My code looks like this:[code]<?phpglobal $user;$function = 'http://my.admin.site/AdminFunctions/adminmodify.cgi?User=';$send = $function . $user->name;if ($_POST['Search']){$Search = $_POST['Search'];$send = $send . "&Search=" . urlencode($Search);}elseif ($_POST['Show']){$Show = $_POST['Show'];$send = $send . "&Show=" . urlencode($Show);}elseif ($_POST['Modify']){$Modify = $_POST['Modify'];$send = $send . "&Modify=" . urlencode($Modify);}elseif ($_POST['Delete']){$Delete = $_POST['Delete'];$send = $send . "&Delete=" . urlencode($Delete);}else{$Main = "Main";$send = $send . "&Main=" . urlencode($Main);}if ($_POST['AdminID']){$AdminID = $_POST['AdminID'];$send = $send . "&AdminID=" . urlencode($AdminID);}if ($_POST['Password']){$Password = $_POST['Password'];$send = $send . "&Password=" . urlencode($Password);}if ($_POST['Admin']){$Admin = $_POST['Admin'];$send = $send . "&Admin=" . urlencode($Admin);}if ($_POST['Email']){$Email = $_POST['Email'];$send = $send . "&Email=" . urlencode($Email);}if ($_POST['Phone']){$Phone = $_POST['Phone'];$send = $send . "&Phone=" . urlencode($Phone);}if ($_POST['Domain']){$Domain = $_POST['Domain'];$send = $send . "&Domain=" . urlencode($Domain);}if ($_POST['Domains']){$Domains = $_POST['Domains'];$send = $send . "&Domains=" . urlencode($Domains);}if ($_POST['Rights']){$Rights = $_POST['Rights'];$send = $send . "&Rights=" . urlencode($Rights);}if ($_POST['Datafile']){$Datafile = $_POST['Datafile'];$send = $send . "&Datafile=" . urlencode($Datafile);}echo $send;include $send;?>[/code]I grab any posted variables, then pass them in the URL to the perl function. It works fine for the Main, Search, and Show pages; for those pages the URL in my address bar is my php page and the URL created in $send contains all the correct variables. My problem is with the Modify and Delete. When either of these are posted, the URL in my address bar contains all the variables, and the URL created in $send has none, which causes me to return to my main page and doesn't accomplish the Modify or Delete.I have looked and looked at the forms that do the posting, but cannot see any difference. What would cause something like this?Any help will be greatly appreciated. I feel I'm really beating my head against a wall on this one. Link to comment https://forums.phpfreaks.com/topic/16442-the-passing-of-post-variables-sometimes-not-working-as-expected/ Share on other sites More sharing options...
anner Posted August 3, 2006 Author Share Posted August 3, 2006 In case anyone is curious, I had a stray '[code]<form action=http://my.admin.stie/adminmodify.cgi method=POST'>[/code] Link to comment https://forums.phpfreaks.com/topic/16442-the-passing-of-post-variables-sometimes-not-working-as-expected/#findComment-68505 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.