Why do you have backslashes infront of the single quotes in
$sql2 = "UPDATE `counters` SET `Count`=\'$CurrentCount\' WHERE `Site`=\'1\'";
You should always check for mysql errors. They will usually tell you what is wrong:
$sql = "SELECT `Count` FROM `counters` WHERE `Site`='1'"...
Yes, VMS is still being used and developed. The VMS web site at HP can be found at http://www.hp.com/go/vms
The OS has been ported to the Itanium-64 chipset.
There is also an active Hobbyist area for VMS. Information on that can be found at http://www.openvmshobbyist.com/
Ken
OpenVMS System...
Pathworks is still out there and is still Propietory, but samba does run on VMS and can do the same thing. Are you machines on a network? If so try FTP or even Kermit.
Ken
Check the value if the register_globals in your PHP.INI file
It sounds like you programed your code assuming that it is enabled when it should be disabled. See http://www.php.net/register_globals for more information.
Ken
How are the checkboxes named? If you show us that code, we might be able to come up with a more effecient way of naming them so that your coding to check them is simple.
Ken
What do you want your output to look like?
Here's one possible option:
<?
$a = array("col1" => array("title"=>"c1title", "hidden"=>'false'), "col2" => array("title"=>"c2title", "hidden"=>'true'));
$set = array();
foreach ($a as $key=>$ary)
foreach ($ary as $subkey => $val)
$set[] =...
Add an "or die" clause on to the mysql_select_db() function:
mysql_select_db($database_connect,$connect) or die('Could not select database<br>'.mysql_error());
and see what you get.
Ken
This works fine, I didn't store it in the database.
$test1 = array("me","he","dragon's");
$test2 = serialize($test1);
echo $test2;
$test3 = addslashes($test2);
echo '<br>'.$test3;
$test4 = unserialize(stripslashes($test3));
echo '<pre>';print_r($test4);echo '</pre>';
Are you doing something...
You can use stripslashes() to remove the slashes added with addslashes().
The better way is to use mysql_real_escape_string() when you put it in the database. You don't have to do anythine when you remove it, since MySQL will automagically do the right thing.
Ken
How's this? It uses serialize(), unserialize() and array_unique(). The $orig array is the one you started with, $new_orig is the array with unique entries. The echo statement are for debugging, so you can see what's going on.
echo '<pre>';print_r($orig);echo '</pre>';
foreach ($orig as $k=>$na)...
It's probably a register_globals Enabled vs. Disabled.
How do you reference variables coming from the form. If you don't use $_POST, $_GET, or $_REQUEST, change to that method and your scripts will work no matter where you run them.
See http://www.php.net/register_globals for more information.
Sounds like you don't have UCX on the machine, you might have TCPware or Multinet. Do a
$ sho logical/sys multinet*
$ sho logical/sys tcpware*
and see if you get anything back.
Also, my may want to post on the newsgroup comp.os.vms
If you don't know what a newsgroup is, go to...
You posted you section of your form:
<tr>
<td height="20" class="contactform">
<input name="mail" type="checkbox" style="border:0px;" value="mail" checked> Receive FREE Newsletter</td>
</tr>
and the section of code that's causing the problem:
$mail= $_POST['mail'];
if($mail == "checked") {...
Sounds like you could be running into the default 30 second time limit for running a script.
Take a look at the set_time_limit() fumction.
http://www.php.net/set_time_limit
Ken
Can we see the rest of your script, or at least enough that shows the problem?
If you echo the query before the executing it, does it look right?
Do you have error checking on you mysql function calls?
Ken
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.