Jump to content

stockton

Members
  • Posts

    319
  • Joined

  • Last visited

    Never

Everything posted by stockton

  1. I have a database of information which I retrieve via:- while ($row = mssql_fetch_array($rs)) { $TransactionDate = $row['DateWon']; $MemberNumber = $row['MemberNumber']; $TicketNumber = $row['TicketNumber']; $UserID = $row['UserID']; $LQS = "Select * from Users WHERE UserNum = ".$UserID; $sr = mssql_query($LQS, $link); while ($row = mssql_fetch_array($sr)) { $First = $row['FirstName']; $Surname = $row['LastName']; } $User = $First." ".$Surname; } the data of which I need to use later in my script. Therefore I felt if I could save the retrieved data in an array I could extract it later when I need to use it. Most of the tutorials I have looked at only have one item in their arrays and I want 5. Maybe it is just because I am an old time C programmer but I would have thought this would be easy but so far I have had no joy. BTW Where I want to use this data is in an html table similar to the following:- <tr bgcolor="#C0A062" onMouseover=this.bgColor="#FFF7DF" onMouseout=this.bgColor="#C0A062" > <td align=\"center\"><?php echo $TransactionDate ?></td> <td align=\"center\"><?php echo $MemberNumber ?></td> <td align=\"center\"><?php echo $TicketNumber ?></td> <td align=\"center\"><?php echo $User ?></td> </tr> Suggestions please.
  2. Thank you again. Now what would be really neat is to get #1 to immediately follow #250. Do you think that that could be done?
  3. Can only think that what needs changing is max_execution_time in php.ini Will have to talk to sysadmin. Is there no way to alter this for a particular script at run time?
  4. I am getting Fatal error: Maximum execution time of 60 seconds exceeded in......... from a PHP5 application I have running on XP. Is this a setting in php.ini I need to alter?
  5. Dj Kat thank you for your input. However it is now scrolling from the top to the bottom rather than from the bottom up....:-) See www.stockton.co.za/LeaderBoard
  6. Look at www.stockton.co.za/LeaderBoard to see what I mean.
  7. The site is at http://www.stockton.co.za/LeaderBoard
  8. I have been given an application to maintain and it includes an external style sheet part of which is shown below:- #SlotsWindow { position:absolute; width:47%; height:80%; top: 125px; left: 120px; overflow: hidden; } I have been given to understand that mixing percentages with px is bad practice but I do not understand how I can easily translate the above px to percentages. Suggestions please.
  9. I have a web page using html, javascript & css and sad to say some of the code I am using was copied from other sites without fully understanding how they work. To cut a long story shorter http://www.stockton.co.za/LeaderBoard/ is almost working 100% but there is one annoying issue. The issue is that I want the scroll to start at the bottom of the page and when getting to the end of the text I would like #1 to immediately follow #250, not have a gap inbetween. The html :- <head> <title>Leader Board Month</title> <META HTTP-EQUIV="refresh" CONTENT="300"> <script language="JavaScript" type="text/javascript" src="js/LeaderBoard.js"> </script> <link rel="stylesheet" type="text/css" href="style/LeaderBoard.css"> </head> <BODY TEXT=#FFFFFF> <div id="SlotsWindow"> <div id="SlotsText"> <p><center> <?php include("SlotsMonth.html"); ?> </center> </p> </div> </div> <div id="TablesWindow"> <div id="TablesText"> <p> <?php include("TablesMonth.html"); ?> </p> </div> </div> </body> </html> the javascript:- // global variable for position of the scrolling window var pos=180; var pos2 = 180; function SlotsScroll() { obj=document.getElementById("SlotsText"); pos -= 1; if (pos < 0-obj.offsetHeight+130) { pos = 180; } obj.style.top=pos; window.setTimeout("SlotsScroll();",20); } function TablesScroll() { obj=document.getElementById("TablesText"); pos2 -= 1; if (pos2 < 0-obj.offsetHeight+130) { pos2 = 180; } obj.style.top=pos2; window.setTimeout("TablesScroll();",20); } function Scroll() { if (!document.getElementById) return; SlotsScroll(); TablesScroll(); } // Start scrolling when the page loads window.onload = Scroll; and finally the style sheet:- BODY { font-family: verdana,arial; background-color: #b4d9fb; background-image: url("../images/Background.jpg"); background-repeat: no-repeat; background-position: top center } #SlotsWindow { position:absolute; width:47%; height:80%; top: 125px; left: 120px; overflow: hidden; } #TablesWindow { position:absolute; left: 450; width:47%; height:80%; top: 125px; overflow: hidden; } #SlotsText { text-align: right; font-size: large; position: relative; right: 30; width: 50%; left: 65; top: 150; } #TablesText { text-align: right; font-size: large; position: relative; right: 420; width: 50%; left: 65; top: 150; }
  10. Thank you. We will do more investigation.
  11. We changed session.gc_maxlifetime in the php.ini using session.gc_maxlifetime=3600 & restarted Apache & yes we checked phpinfo(). The user signs in and does one or two things from a menu and then might leave the system for a minute or two and when they come back to it by clicking on a menu item they are told to logon to effect that choice & I can only assume that they have been timed out by the system. I have the same configuration working fine on my Windows XP machine as well as under Linux Ubuntu. BTW My current setup also works on Windows Server 2003 SP2.
  12. I have php 5.0.3 installed on Windows Server 2003 SP1 running Apache and even though I have set the session timeout to 3600 seconds my users are getting timed out within a couple of minutes. Please tell me how to fix this.
  13. I think that maybe I should read a bit more carefully and see where your quotes started and finished. <input type="submit" value="Submit" onclick="submit_click(); return false;"> rather than <input type="submit" value="Submit" onclick="submit_click()"; return false;> Thanks for the help xenophobia.
  14. Thank you for your suggestion but I have done as you suggest by adding a return false but it still fails. That line now looks like:- <input type="submit" value="Submit" onclick="submit_click()"; return false;>
  15. Have a look at http://www.phpfreaks.com/forums/index.php/topic,195676.0.html to see how I did it. Hope that that helps.
  16. I have a web page at http://www.watersprite.co.za/email.shtml which includes javascript to check that the user has filled all fields and only if all fields are completed call the mail.php script to send the message. It always calls the mail.php script even if the alert has appeared to show there is an error. Please tell me what my silly mistake is(it must be silly as I have this working in other places). <html> <head> <title> WaterSprite's E-Mail Page </title> <SCRIPT LANGUAGE="JavaScript"> function reset() { document.ws_email.name.value=""; document.ws_email.email.value=""; document.ws_email.subject.value=""; document.ws_email.content.value=""; } function submit_click() { var bError = false; var strErrorMsg = ""; if (ws_email.name.value == "") { strErrorMsg += "You must enter a name\n"; bError = true; } else if (ws_email.email.value == "") { strErrorMsg += "You must enter an email address\n"; bError = true; } else if (ws_email.subject.value == "") { strErrorMsg += "Please enter the subject\n"; bError = true; } else if (ws_email.content.value == "") { strErrorMsg += "We cannot help you unless you tell us what help you need\n"; bError = true; } if (bError == true) { alert(strErrorMsg); } else { ws_email.submit(); } } </script> </head> <BODY OnLoad="reset()"> <center><img src="assets/images/watersprites_logo.jpg" alt="WaterSprites email" /></center> <br /> <H1 ALIGN=center>Send E-mail to WaterSprite</H1> <pre> <form name="ws_email" ID="ws_email" action=mail.php method=post> Your Full Name : <input type="text" name="name"> Your EMail address : <input type="text" name="email"> Subject : <input type="text" name="subject"> Your EMail message : <textarea rows=6 cols=65 name="content" ></textarea> <center> <input type="submit" value="Submit" onclick="submit_click()"> <input type="reset" value="Clear"> </center> </form> </pre> <hr width=50%> <P ALIGN=RIGHT>Page last revised on <!--#echo var="LAST_MODIFIED"--> </body> </html>
  17. I have a program that has worked for quite some time using the following code to connect to 10g. Now suddenly at one of my sites it is failing with ORA-24327 need explicit attach before authenticating a user. Please tell me where I have gone wrong. <?php function SGMDBConnect() { // Connect to database... global $SGMDBUsername, $SGMDBPassword, $SGMDBName, $conn; $conn=OCILogon($SGMDBUsername, $SGMDBPassword, $SGMDBName); if ( ! $conn ) { $e = oci_error(); // For oci_connect errors pass no handle echo htmlentities($e['message']); trigger_error('Unable to OCILogon to database', E_USER_ERROR); die(); } } ?>
  18. I have written a little program which appears to work fine but..... The code looks like:- <?php session_start(); // Get the current Session Timeout Value $currentTimeoutInSecs = ini_get('session.gc_maxlifetime'); echo "\nDefault timeout = ".$currentTimeoutInSecs." seconds\n"; // Change the session timeout value to 30 minutes ini_set('session.gc_maxlifetime', 30*60); $currentTimeoutInSecs = ini_get('session.gc_maxlifetime'); echo "Altered timeout = ".$currentTimeoutInSecs." seconds\n"; ?> and this appears to work fine except that the second time I run it I would expect to see the default time altered to what I set it to rather than what it was in the 1st place. No matter how many times I run it the results are always:- Default timeout = 1440 seconds Altered timeout = 1800 seconds Please tell me why.
  19. and I have done that to no avail.
  20. Sorry, I should have said that I had done that.
  21. I have on my Slackware Linux server PHP Version 4.4.2 with Apache/1.3.33 (Unix) PHP/4.4.2 and mysql is installed as well but when i run info.php I do not see an entry for mysql, despite the header telling me '--with-mysql=shared,/usr'. 'which mysql' tells me '/usr/bin/mysql' What do I need to fix to get mysql and php working together?
×
×
  • 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.