Jump to content

Urgent Help needed


mum4d

Recommended Posts

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!!!!
Link to comment
https://forums.phpfreaks.com/topic/8443-urgent-help-needed/
Share on other sites

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.
Link to comment
https://forums.phpfreaks.com/topic/8443-urgent-help-needed/#findComment-30876
Share on other sites

[!--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 OFF

any other solutions??

Thanks again!
Link to comment
https://forums.phpfreaks.com/topic/8443-urgent-help-needed/#findComment-30880
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.