Jump to content

otuatail

Members
  • Posts

    961
  • Joined

  • Last visited

Everything posted by otuatail

  1. Hi. I use easyspace as the provider for my website domain and a MySQL database. I have just tried to add a table to one of the database's. I am getting The above error now. Has easyspace messed with the configuration of the database as I am not allowed to or would not know how to.
  2. Thanks Barand that works but still fail to understand how it RestoreDecimal() caused the problem.
  3. I am not rounding a calculation 5-2 = 3 is not rounding.
  4. function RestoreDecimal($curValue) // E2007 { $test = explode(".",$curValue); if(strlen($test[1]) == 1) $curValue .= "0"; return $curValue; Sorry forgot I am using a function to make Shure I have to decimal places because some output was £3.5 not £35.50
  5. Money in Money Out Balance £101.84 £10.00 £91.84 £1.05 £90.79 £1.96 £88.83 £88.00 £0.83000000000001 <? // Banking Version 1.0.0 22-07-2015 Desmond O'Toole. require("../secure/SecureFunctions.php"); include ("secure/SecureFunctionsBank.php"); session_start(); Session_Init(); $page = "Libray Selection"; if(!isset($_SESSION["Pk"])) { header('Location: index.php'); exit; } $Pk = $_SESSION["Pk"]; if(KeyCheckX($Pk)== 0) { header('Location: index.php'); exit; } if(isRoguebot($Browser) == 1) exit; $_SESSION["K9"] = isRobot($Browser); if($_SESSION["current_page"] <> $page && $_SESSION['Event_Log'] == "YES") { StoreData($page); mailtoX($page,"Desmonds New Site.",""); } $_SESSION["current_page"] = $page; $filename = filename($_SERVER['PHP_SELF']); $Update = date("D d-M-Y H:i", filectime($filename)); $qBalance = GetBalance(); $row = mysql_fetch_array($qBalance); $Date = $row['EntryDate']; $Value = $row['BalanceValue']; $stamp = strtotime($Date); //$ViewDate = date('D d-M-Y' ,$stamp); $StartDate = date('D d-M-Y' ,$stamp); //$QueryDate = date('d-M-Y' ,$stamp); $qGetAllData = GetAllData($Date); $curValue = $Value; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Pages Home</title> <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <META http-equiv="imagetoolbar" CONTENT="no"> <meta http-equiv="refresh" content="60"> <link rel="stylesheet" href="stylesheets/Library.css" type="text/css"> <link rel="stylesheet" href="stylesheets/LibraryMenu.css" type="text/css"> </head> <body> <div id="PageTitle"> <img src="images/LibraryBanner.jpg" alt=""> </div> <? include('SideMenu.php'); ?> <div id="PageContent"> <form action="menu.php" method="post"> <h3>User: <?=greeting()?></h3> <h4><? echo MonthlTakings()?></h4> <div style="width:720px;padding:0px;float:left;"> <div style="width:120px;height:10px;padding:10px;float:left;"><b> Date</b> </div> <div style="width:70px;height:10px;padding:10px;float:left;"><b>Money In</b> </div> <div style="width:70px;height:10px;padding:10px;float:left;"><b>Money Out</b> </div> <div style="width:70px;height:10px;padding:10px;float:left;"><b>Balance</b> </div> <div style="width:70px;height:10px;padding:10px;float:left;"><b>Reason</b> </div> <div style="width:190px;height:10px;padding:10px;float:left;"><b>Comment</b> </div> <div style="width:120px;height:4px;padding:10px;text-align:right;float:left;clear:both"><a href="DataInput.php"><?=$StartDate?></a> </div> <div style="width:70px;height:4px;padding:10px;text-align:right;float:left;"> </div> <div style="width:70px;height:4px;padding:10px;text-align:right;float:left;"> </div> <div style="width:70px;height:4px;padding:10px;text-align:right;float:left;">£<?=$Value?> </div> <div style="width:70px;height:4px;padding:10px;float:left;"> </div> <div style="width:190px;height:4px;padding:10px;float:left;">Brought forward </div> <? while($row = mysql_fetch_array($qGetAllData)) { $stamp = strtotime($row['EntryDate']); $ViewDate = date('D d-M-Y' ,$stamp); $CurDate = date('D d-M-Y' ,time()); $input = '£' . $row['Input']; if($row['Input'] == '0.00') $input = ""; $out = '£' . $row['Output']; if($row['Output'] == '0.00') $out = ""; $reason = GetReasonName($row['Reason']); $colorSelect = ColourPicker($row['Reason'],$row['EntryDate']); $curValue = $Value + $row['Input'] - $row['Output']; $curValue = RestoreDecimal($curValue); $Value = $curValue; $Comment = $row['Comment']; //$ID = TransposeKey($row['Tag']); $ID = $row['Tag']; $x = ""; //if($CurDate == $ViewDate) // $x = "background-color:#cdcccc;"; // background-color:#6495ed; if($colorSelect == "#777777") { ?> <div style="width:120px;height:4px;padding:10px;text-align:right;float:left;text-color:green;clear:both"><?=$ViewDate?></div> <? } else { ?> <div style="width:120px;height:4px;padding:10px;text-align:right;float:left;text-color:green;clear:both"><a href="StatmentEntry.php?ID=<?=$ID?>"><?=$ViewDate?></a></div> <? } ?> <div style="width:70px;height:4px;padding:10px;color:<?=$colorSelect?>;<?=$x?>text-align:right;float:left;"><?=$input?> </div> <div style="width:70px;height:4px;padding:10px;color:<?=$colorSelect?>;<?=$x?>text-align:right;float:left;"><?=$out?> </div> <div style="width:70px;height:4px;padding:10px;color:<?=$colorSelect?>;<?=$x?>text-align:right;float:left;">£<?=$curValue?> </div> <div style="width:70px;height:4px;padding:10px;color:<?=$colorSelect?>;<?=$x?>float:left;"><?=$reason?> </div> <div style="width:190px;height:4px;padding:10px;color:<?=$colorSelect?>;<?=$x?>float:left;"><?=$Comment?> </div> <? } ?> <div style="width:70px;height:1px;padding:10px;float:left;clear:both"> </div> </div> <div style="width:670px;height:50px;padding:0px;float:left;"> <input class="MyButton"type="submit" name="direction" value="Main Menu"> <br> </div> </form> </div> </body> </html> Hi I have data from a database table. The table holds simply the date, Money going in, Money going out and a reason fro the transaction. I simply have a rolling balance which is calculated on the fly as the page is created using the data. What I have is this. But all I am doing is adding and subtracting. I could understand it if I divided 1/3
  6. How do I mark it as answered?
  7. Sorry cancel that. Must have had a mental breakdown.
  8. SELECT EntryDate, Input, Output, Comment, Tag, Bank_Reason.Reason AS Reason FROM Bank_Data.Reason INNER JOIN Bank_Reason.ReasonID WHERE Tag = '55ad7d70397665cdf6bd175bcf55eda83d45feb96'; #1142 - SELECT command denied to user 'otookr692'@'10.3.4.92' for table 'Reason' DROP TABLE IF EXISTS `Bank_Data`; CREATE TABLE IF NOT EXISTS `Bank_Data` ( `EntryDate` date DEFAULT NULL, `Input` decimal(6,2) NOT NULL DEFAULT '0.00', `Output` decimal(6,2) NOT NULL DEFAULT '0.00', `Reason` tinyint(1) NOT NULL DEFAULT '0', `Comment` varchar(32) NOT NULL DEFAULT '', `Tag` varchar(45) NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `Bank_Reason`; CREATE TABLE IF NOT EXISTS `Bank_Reason` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `ReasonID` tinyint(1), `Reason` varchar(10) DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; I have 2 table Bank_Data and Bank_Reason. I can do a select on both in phpmyadmin. The following query fails with a kind of access denied statement
  9. Thanks for both of those suggestion. It works now.
  10. SELECT * FROM Bank_Data WHERE EntryDate > '2015-07-20' AND EntryDate < DATE_ADD(2015-07-20, 6 WEEK) ORDER BY EntryDate ASC, Output Sorry should have reversed the date but it still fails. Now
  11. $sqlAllData = "SELECT * FROM Bank_Data WHERE EntryDate > '" . $StartDate . "' AND EntryDate < DATE_ADD('$StartDate', 6 WEEK) ORDER BY EntryDate ASC, Output"; echo = SELECT * FROM Bank_Data WHERE EntryDate > '20-Jul-2015' AND EntryDate < DATE_ADD('20-Jul-2015', 6 WEEK) ORDER BY EntryDate ASC, Output I copied this from the MySQL site but can't get it to work.
  12. It would have helped better if my hosting provider had stopped playing around with the database servers as well. This meddling can be frustrating.
  13. MY .htacces file php_flag display_startup_errors on php_flag display_errors on php_flag html_errors on php_flag log_errors on Hi I am trying to populate a drop down box from a database table. When I tried I got no entries. I renamed a function from GetReason() to GetReason2() which does not exist. I should get an error. The problem is it doesn't go into the real function. The function is in Secure/SecureFunctions/Bank.php And here is the function which I am NOT calling function GetReason() // E2001 { $sqlList = "SELECT * FROM EventLog"; echo $sqlList; exit; $qList = mysql_query($sqlList); return $qList; } Here is the code for GetReason but as I explained earlier I am trying to call a function that DOES NOT EXSIST. You say that is why I get the error. Wrong. I don't get the error. This was the original post ... I later discovered that if I right click and view source it is there. errors are on. If I rename one of the required files at the top I get "Can't open input stream". Does this mean that errors are on if so. why do I have to right click and view source to see echo MySQLstament; exit;
  14. Fatal error: Call to undefined function GetReason2() in /vhost/vhost15/d/e/s/desmond-otoole.co.uk/www/bank/DataInput2.php on line 19 <? // YBC Malawi Version 1.0.0 30-03-2009 Desmond O'Toole. require("../secure/SecureFunctions.php"); require("secure/SecureFunctionsBank.php"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Pages Home</title> <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <META http-equiv="imagetoolbar" CONTENT="no"> <meta http-equiv="refresh" content="60"> <link rel="stylesheet" href="stylesheets/Library.css" type="text/css"> <link rel="stylesheet" href="stylesheets/LibraryMenu.css" type="text/css"> </head> <body <div > <select name="Reason"> <? $qReason = GetReason2(); while($row = mysql_fetch_array($qReason)) { ?> <option value="<?=$row['ReasonID']?>" <? if($_SESSION['MyReason'] == $row['ReasonID']) {?> selected <? }?>><?=$row['Reason']?></option> <? } ?> </select> </div> </div> </div> </body> </html> I have created a test file and reduced it all down to the above. I don't get an error GetReason2() not found. If I remove the iner <div></div> I now get
  15. Fatal error: require(): Failed opening required 'secure/SecureFunctionsBank2.php' (include_path='.:/usr/share/pear:/usr/share/php') in /vhost/vhost15/d/e/s/desmond-otoole.co.uk/www/bank/DataInput.php on line 4 Yes the path is correct and the php file is SecureFunctionsBank.php if I rename it to SecureFunctionsBank2.php I get the following error. Errors are on.
  16. <? // YBC Malawi Version 1.0.0 30-03-2009 Desmond O'Toole. require("../secure/SecureFunctions.php"); require("secure/SecureFunctionsBank.php"); session_start(); Session_Init(); $page = "Libray Selection"; if(!isset($_SESSION["Pk"])) { header('Location: index.php'); exit; } $Pk = $_SESSION["Pk"]; if(KeyCheckX($Pk)== 0) { header('Location: index.php'); exit; } // $res = connected(); if(isRoguebot($Browser) == 1) exit; $_SESSION["K9"] = isRobot($Browser); if($_SESSION["current_page"] <> $page && $_SESSION['Event_Log'] == "YES") { // StoreData($page); // mailtoX($page,"Desmonds New Site.",""); } $_SESSION["current_page"] = $page; $filename = filename($_SERVER['PHP_SELF']); $Update = date("D d-M-Y H:i", filectime($filename)); $DD = date('d'); $MM = date('m'); $YYYY = date('Y'); //if($_SESSION["DD_NEW"] == "") $_SESSION["DD_Balance"] = $DD; //if($_SESSION["MM_NEW"] == "") $_SESSION["MM_Balance"] = $MM; //if($_SESSION["YYYY_NEW"] == "") $_SESSION["YYYY_Balance"] = $YYYY; //if($_SESSION["DD_NEW"] == "") $_SESSION["DD_Entry"] = $DD; //if($_SESSION["MM_NEW"] == "") $_SESSION["MM_Entry"] = $MM; //if($_SESSION["YYYY_NEW"] == "") $_SESSION["YYYY_Entry"] = $YYYY; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Pages Home</title> <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <META http-equiv="imagetoolbar" CONTENT="no"> <meta http-equiv="refresh" content="60"> <link rel="stylesheet" href="stylesheets/Library.css" type="text/css"> <link rel="stylesheet" href="stylesheets/LibraryMenu.css" type="text/css"> </head> <body> <div id="PageTitle"> <img src="images/LibraryBanner.jpg" alt=""> </div> <? include('LibraryMenu.php'); ?> <div id="PageContent"> <form action="Redirector.php" method="post"> <h3>User: <?=greeting()?></h3> <div style="width:750px;height:50px;padding:10px;overflow:hidden"> <div style="width:200px;height:50px;float:left;">Carried forward: £<span style="color:red;"><?=$_SESSION['Error_3']?></span> <input type="text" maxlength="10" name="BF" value="<?=$_SESSION['C_Forward']?>" size="8"></div> <div style="width:240px;height:50px;float:left;"> <div style="width:440px;float:left;">Date: <input style="text-align:right;" type="text" maxlength="2" name="DD_Balance" value="<?=$_SESSION["DD_Balance"]?>" size="1"> / <input style="text-align:right;" type="text" maxlength="2" name="DD_Balance" value="<?=$_SESSION["MM_Balance"]?>" size="1"> / <input style="text-align:right;" type="text" maxlength="4" name="YYYY_Balance" value="<?=$_SESSION["YYYY_Balance"]?>" size="4"> <span style="color:red;"><?=$_SESSION['Error_4']?></span></div> </div> <input class="MyButton"type="submit" name="MainBalance" value=" Prev Balance "> </div> <div style="width:750px;height:200px;border:solid;padding:10px;overflow:hidden"> <div style="width:240px;height:50px;float:left;"> <div style="width:440px;float:left;">Entry Date: <input style="text-align:right;" type="text" maxlength="2" name="DD_Entry" value="<?=$_SESSION["DD_Entry"]?>" size="1"> / <input style="text-align:right;" type="text" maxlength="2" name="MM_Entry" value="<?=$_SESSION["MM_Entry"]?>" size="1"> / <input style="text-align:right;" type="text" maxlength="4" name="YYYY_Entry" value="<?=$_SESSION["YYYY_Entry"]?>" size="4"> <span style="color:red;"><?=$_SESSION['Error_5']?></span></div> </div> <div style="width:200px;height:50px;float:left;clear:both">Money in: £<span style="color:red;"><?=$_SESSION['Error_6']?></span> <input type="text" maxlength="10" name="MoneyIn" value="<?=$_SESSION['Money_In']?>" size="8"></div> <div style="width:200px;height:50px;float:left;clear:both">Money Out: £<span style="color:red;"><?=$_SESSION['Error_7']?></span> <input type="text" maxlength="10" name="MoneyOut" value="<?=$_SESSION['Money_Out']?>" size="8"></div> <div style="width:280px;height:50px;float:left;clear:both;">Reason: <span style="color:red;"><?=$_SESSION['Error_7']?></span> <select name="Reason"> <? $qReason = GetReason2(); while($row = mysql_fetch_array($qReason)) { ?> <option value="<?=$row['ReasonID']?>" <? if($_SESSION['MyReason'] == $row['ReasonID']) {?> selected <? }?>><?=$row['Reason']?></option> <? } ?> </select> </div> </div> </div> </form> </div> </body> </html> Hi I am trying to populate a drop down box from a database table. When I tried I got no entries. I renamed a function from GetReason() to GetReason2() which does not exist. I should get an error. The problem is it doesn't go into the real function. The function is in Secure/SecureFunctions/Bank.php the code is at the bottom line 112 - 121. Thanks.
  17. <div style="height:40px;width:300px;margin-top:15px;clear:both;border:solid;"> <input type="submit" value=" Update Teams "> </div> Hi I have tried margins and borders both top and bottom I just want the submit button vertically centred. This is part of another div hence the clear:both; TA Driving me mental...
  18. Hi thanks for this. It works if I make it into a complete html text <html><body><a></a></body></html> Just <a></a> doesn't work. Thanks.
  19. $name="postmaster"; $site ="millersyard"; $webemail = $site . "@desmond-otoole.co.uk"; $headers = "From: $name <$webemail>\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $RemoveMsgTag = "< a href='http://site2.desmond-otoole.co.uk/CustomerRemove.php'>Remove me</a>"; $msg .= "\r\n\r\n$RemoveMsg $RemoveMsgTag\r\n"; $success = mail($emailList,$subject, $msg, $headers, '-froot@desmond-otoole.co.uk'); // must comply with » RFC 2822. I have tried turning it into a html email using code found on internet.
  20. $msg = "Test msg "; $RemoveMsg = "Extra info "; $RemoveMsgTag = "< a href='http://site2.desmond-otoole.co.uk/CustomerRemove.php'>Remove me</a>"; $msg .= "\r\n\r\n$RemoveMsg $RemoveMsgTag\r\n"; $success = mail($emailList,$subject, $msg, $headers, '-froot@desmond-otoole.co.uk'); // must comply with » RFC 2822. Hi I want to send out a mailing list with a link at the bottom for anyone wishing to be removed. I can't get the link working.
  21. <?php // Library SMS3S Version 1.0.0 15-03-2014 Desmond O'Toole. require("../secure/SecureFunctions.php"); $page = "Admin"; session_start(); . . . if($_SESSION["current_page"] <> $page) { StoreData($page); mailtoX($page,"Library Admin Login.",""); } $_SESSION["current_page"] = $page; ======================== The idea is that current session only changes when a user goes from page to page. But if I hit F5 I get another log StoreData(). But the session should prevent this. Hi I have a db log that records the pages that a user visits. I don't want a repeat log if they hit F5 This is what I have been trying...
  22. Hi. The code I have been using for 10 years has stopped again. I believe this is a configuration problem with my web host. The code was working up to yesterday and other parts of the website have similar code that has stopped. Is there any way I can use some sort of ini set to overcome this. I was hoping to demo a website today and now this. I even have a test mail() with default fixed values that should also work. Here is the code complete with what was echo(d) back. Any help would be really appreciated here. I am desperate to get this email working again. *** /* $emailList = ""; $qCustomers = GetCustomers($_SESSION['MySQLEmail']); while ($row = mysql_fetch_array($qCustomers)) { $emailList .= $row['Email'] . ","; } $emailList = trim($emailList, ","); echo $_SESSION['MySQLEmail'] . "<br>"; echo "$emailList<br><br>"; */ $emailList = "paulotuatail@aol.com,desotuatail@aol.com,otuatail@aol.com"; $site ="mysight"; $webemail = $site . "@desmond-otoole.co.uk"; $headers = "From: $site <$webemail>\r\n"; $success = mail($emailList,$subject, $msg, $headers, '-froot@desmond-otoole.co.uk'); // must comply with » RFC 2822. echo "Success1: " . $success . "<br>List: " . $emailList . "<br>Subject: " . $subject . "<br>Site: " . $site . "<br>webemail: " . $webemail . "<br>headers: " . $headers . "<br><br>"; /* result of above echo Success1: 1 List: paulotuatail@aol.com,desotuatail@aol.com,otuatail@aol.com Subject: Happy christmas from everyone here at Millers Yard Site: mysight webemail: mysight@desmond-otoole.co.uk headers: From: mysight */ // test using fixed text values This also failes *** $success = mail("paulotuatail@aol.com,desotuatail@aol.com,otuatail@aol.com","My Subject", "My Message", "From: $site <mysight@desmond-otoole.co.uk>\r\n", '-froot@desmond-otoole.co.uk'); // must comply with » RFC 2822. ***
  23. div style="width:715px;padding:10px;overflow:hidden"> <div style="width:100px;float:left;"><input type="radio" name="Sort" value="Name" /><b>Name</b></div> <div style="width:100px;float:left;"><input type="radio" name="Sort" value="Surname" /><b>Surname</b></div> <div style="width:100px;float:left;"><input type="radio" name="Sort" value="City" /><b>City</b></div> <div style="width:100px;float:left;"><input type="radio" name="Sort" value="PC" /><b>Post Code</b></div> <div style="width:100px;float:left;"><input type="radio" name="Sort" value="Sex" /><b>Sex</b></div> <div style="width:110px;float:left;"><input type="radio" name="Sort" value="Room" /><b>Room Used</b></div> <div style="width:100px;float:left;"><input type="radio" name="Sort" value="Last" /><b>Last Visit</b></div> echo out on next page echo $_POST['Sort']; exit; I have a page that displays data in columns. I have a Colum header with a radio button site2.desmond-otoole.co.uk/index.php when I submit to the next page and echo out $_POST. NOTHING. I should be able to modify the query from there.
×
×
  • 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.