Jump to content

d_barszczak

Members
  • Posts

    188
  • Joined

  • Last visited

Everything posted by d_barszczak

  1. Can any one find a problem with the following javascript? [code] < script Type=text\javaScript Language=javaScript> window.location.replace('www.google.com'); </ script> [/code] [font=Verdana][color=red]Please note the space between < script is not an error just the forum would let me submit.[/color][/font] This has worked fine for me for over 12 months but since my workplace upgraded to ie7 it's all gone to pot. The browser just seems to ignore the code all together. Fire Fox too.
  2. You need to install php which you can use with IIS. Apache is not required.
  3. Hi, I have designed a call managment system and im currently working on a report. I have stored all dates as unix timestamps and i need to searc all jobs completed on a certain date ie all jobs complete on 22 August but abviouslt the timestamp goes right down to each second. Any help would be great.
  4. ahh so thats my problem. I have always used an web hosting company to manage my mysql server but this is my test server that i have at home. I changed it to ascii_bin as i think the default was something like latin_sweedish or something. So it's the collation. Shortly after i made the post i realised that i have used case-insensitive queries before. Thank you for your help
  5. Ok here is the table in question. [code] +-------+-------------+-----------+------+-----+---------+-------+----------------------+---------+ | Field | Type        | Collation | Null | Key | Default | Extra | Privileges          | Comment | +-------+-------------+-----------+------+-----+---------+-------+----------------------+---------+ | name  | varchar(40) | ascii_bin | YES  |    |        |      | select,insert,update |        | | age  | int(11)    |          | YES  |    |        |      | select,insert,update |        | | sex  | varchar(1)  | ascii_bin | YES  |    |        |      | select,insert,update |        | +-------+-------------+-----------+------+-----+---------+-------+----------------------+---------+ [/code]
  6. Hmmm, Think i may have applyed a setting then as if i perform the query "WHERE name like 'd%'" i get nothing but if i do this "WHERE name like 'D%'" i get the results im after. Thanx.
  7. Hi, I know that MySql is case sensitive but is there any way to ignore case sensitivity so in a table full of names i could search david% and all names begining with David or david or dAvId would be returned. Thanks.
  8. Thats actually better than the way i did it as i had to have a users table and a sessions table wheras you could just search your users table for the last sign of activity not having to worry about deleting sessions and creating them. Just update the last active field. If there's a long way to do something guarunteed ill find it.
  9. This is somthing i have used in the past that is checked every time a user clicks on a link. [code] function update() { $expire = date("U")-60*5; // 5 is the number of minute until expiry. $query = "DELETE FROM sessions WHERE time < '$expire'"; mysql_connect(host, user, pass); $report = mysql_query($query) or die(mysql_error()); } [/code]
  10. Hi, That method don't work but sorted it now anyway. [code] $min = date("U")-60*5; echo date("g:i:s A"); echo "<br>"; echo date("g:i:s A", $min) [/code]
  11. ok, if date("i") is say 1 this wont give me -4 will it?
  12. I know this is such a simple problem as i have done it in the past and also seen it here but can't remember how i did it and cant seem to find it here. Basically i have a $datenow = date("U") and i would like to minus 5 minutes from this. Does anybody know how???
  13. Not the way i did it but your ways better so thankyou for your comments.
  14. Hi, Ok basically i have 2 classes on 2 seperate php files one controls the database functions for my app and the other controls the session management so that a list of current online users can be displayed. The problem im having is that the sessions class needs to use some functions from the database class but all i get is this error code. [i]Fatal error: Call to a member function connect() on a non-object in D:\www\LocalUser\callmanager\classes\sessions.conf.php on line 12[/i] Example code would be as follows. [code] <?php class sessions {       function check() { $sesid = session_id(); $query = "SELECT * FROM sessions WHERE id = '$sesid'"; $mysqldb->connect(); } } [/code] You can call $mysqldb->connect(); from anywhere except from withing the class tags.
  15. [!--quoteo(post=389248:date=Jun 29 2006, 02:37 PM:name=hvle)--][div class=\'quotetop\']QUOTE(hvle @ Jun 29 2006, 02:37 PM) [snapback]389248[/snapback][/div][div class=\'quotemain\'][!--quotec--] you do have to include config.php on every file if you do this. [/quote] Yes i know. But the idea is that config.php will include any other files that i require so i only have to include one file on every page and not 6 or 7.
  16. hvle Please read the above!! I have tried this and it still is not working....
  17. Thanks ToonMariner Ok basically i have have created my classes in seperate php files (For Organisation) and the end of each file i have the line as you suggested. eg. $securitymanager = new securitymanager(); Now if i include (or require_once now) security.class.php directly into the index.php everthing works fine. I dont want to do this though i want config.php to include these files for me so that index.php (and any others) only have to include config.php and then all of the setting are stored in there.
  18. Hi, Not sure if we got our wires crossed as im not wanting to include the same file twice i just want to include one file that then includes the rest of my files so that i should only have to include the config.php then that script will do the rest. If i include the files directly in the index.php it works fine but this way i would have to do this on every page.
  19. Hi, I have one file called index.php which loads a file called config.php via the include command. In the config.php file i want to be able to load my php classes that i have developed for my app so that the index.php file could use any of the classes i have created. [code] <?php // index.php include("config.php"); $securitymanager->proccessLogin(); [/code] [code] <?php // config.php // Load Classes ////////////////// include("security.class.php");  // Loads the security manager. [/code] Now if i include the security.class.php into the index file everything works but this way i get an error [b] Fatal error: Call to a member function databaseConnect() on a non-object in D:\www\LocalUser\callman\index.php[/b] Is there any way i can do what im wanting as it would make my coding life easier if i could use a config file as opposed to including all my classes on every page.
  20. [!--quoteo(post=388469:date=Jun 27 2006, 01:15 PM:name=millen)--][div class=\'quotetop\']QUOTE(millen @ Jun 27 2006, 01:15 PM) [snapback]388469[/snapback][/div][div class=\'quotemain\'][!--quotec--] Hi, I have a problem with my php script and Mozilla Firefox. The text in the script was very far to the left so I changed the margins to get it in the middle of the page. This worked fine in Explorer but not in Firefox. The text is still far to the left. Is there something I can change in the script? I don't know where to start so please answer. // millen [img src=\"style_emoticons/[#EMO_DIR#]/unsure.gif\" style=\"vertical-align:middle\" emoid=\":unsure:\" border=\"0\" alt=\"unsure.gif\" /] [/quote] If you post the code you used to alter your margin i may be able to help you as there is a slight differance in the way ie and firefox handle page margins.
  21. [!--quoteo(post=388383:date=Jun 27 2006, 07:15 AM:name=fahiemulleh)--][div class=\'quotetop\']QUOTE(fahiemulleh @ Jun 27 2006, 07:15 AM) [snapback]388383[/snapback][/div][div class=\'quotemain\'][!--quotec--] Hi all. I have installed php 5. I also have IIS installed on my machine. But as i am a newbie, i dont know whether php is installed or not. Tell me plz how to check that whether php is working on my machine or not. Also , tell me how to run a program of php on a machine. is it something like [a href=\"http://localhost/testing.php\" target=\"_blank\"]http://localhost/testing.php[/a] I have copied the file in Inetpub/wwwroot. plz note down i am using a standalone pc. so plz guide me i will be very thankful to you. [/quote] if you create your testing.php file and put in the following code your php settings will be displayed if installed correctly. [code]<?php phpinfo (); ?>[/code]
  22. [!--quoteo(post=388045:date=Jun 26 2006, 01:32 PM:name=Jus)--][div class=\'quotetop\']QUOTE(Jus @ Jun 26 2006, 01:32 PM) [snapback]388045[/snapback][/div][div class=\'quotemain\'][!--quotec--] My code has elements of that (code posted above).. it just doesn't work. The "from" stays blank [/quote] Where is this variable set?: $array_user_email[0]
  23. [!--quoteo(post=388022:date=Jun 26 2006, 12:03 PM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ Jun 26 2006, 12:03 PM) [snapback]388022[/snapback][/div][div class=\'quotemain\'][!--quotec--] a javascript "jump box" is a pretty simple solution. [a href=\"http://www.javascriptkit.com/combo.htm\" target=\"_blank\"]http://www.javascriptkit.com/combo.htm[/a] [/quote] Sorry about this there must be something in the code that wont allow me to post my full reply i have just tried to pm it to you but still no luck.
  24. [!--quoteo(post=388017:date=Jun 26 2006, 11:52 AM:name=Monshery)--][div class=\'quotetop\']QUOTE(Monshery @ Jun 26 2006, 11:52 AM) [snapback]388017[/snapback][/div][div class=\'quotemain\'][!--quotec--] thanks for quoting me mate - any clue how do i do it ? [/quote] Sorry mate it wont let me post my full replay???
×
×
  • 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.