mum4d Posted April 26, 2006 Share Posted April 26, 2006 I have created a site in dreamweaver. I created a page that inserts data into a MySql database and then re-directs to a new page using the wizzard in dreamweaver. this works fine on my local machine but not on my ISP's server. I think i's because my ISP is only on PHP version 4 (i'm on PHP5).The code created by Dreamweaver is:[code]if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO vistion_orders (x) VALUES (%s)", GetSQLValueString($_POST['x'], "int")); mysql_select_db($database_vistion, $vistion); $Result1 = mysql_query($insertSQL, $vistion) or die(mysql_error()); $insertGoTo = "userholder.php?page=update.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo));}[/code]how can I change this to run on PHP4? This site needs to go live ASAP so I need a quick answer PLEASE!!!! Quote Link to comment https://forums.phpfreaks.com/topic/8443-urgent-help-needed/ Share on other sites More sharing options...
wildteen88 Posted April 26, 2006 Share Posted April 26, 2006 It doesn't really matter if your your ISP is running PHP4 as you are not using any PHP5 specific functions. What I think is the problem is die to your ISP having register_globals turned on. Which means that any use of superglobal arrays will not work, i e($_POSt, $_GET, $_SERVER variables).To see whether Register_globals is on run the following scipt:[code]<?php// remove the space between the p and the h in the code below:p hpinfo();?>[/code]Now run that on your ISPs server and find where it says register_globals if it says On in both coloumns this is the reason why your script isn't working. Quote Link to comment https://forums.phpfreaks.com/topic/8443-urgent-help-needed/#findComment-30876 Share on other sites More sharing options...
mum4d Posted April 26, 2006 Author Share Posted April 26, 2006 [!--quoteo(post=368771:date=Apr 26 2006, 09:30 AM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Apr 26 2006, 09:30 AM) [snapback]368771[/snapback][/div][div class=\'quotemain\'][!--quotec--]It doesn't really matter if your your ISP is running PHP4 as you are not using any PHP5 specific functions. What I think is the problem is die to your ISP having register_globals turned on. Which means that any use of superglobal arrays will not work, i e($_POSt, $_GET, $_SERVER variables).To see whether Register_globals is on run the following scipt:[code]<?php// remove the space between the p and the h in the code below:p hpinfo();?>[/code]Now run that on your ISPs server and find where it says register_globals if it says On in both coloumns this is the reason why your script isn't working.[/quote]Thanks for a quick reply,I have PhpMyAdmin installed on their server. form there I clicked the "show PHP Information" link and that states that register_globals are both OFFany other solutions??Thanks again! Quote Link to comment https://forums.phpfreaks.com/topic/8443-urgent-help-needed/#findComment-30880 Share on other sites More sharing options...
mum4d Posted April 26, 2006 Author Share Posted April 26, 2006 Anyone? Quote Link to comment https://forums.phpfreaks.com/topic/8443-urgent-help-needed/#findComment-30914 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.