Jump to content

zawadi

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Everything posted by zawadi

  1. Ok, I'm using PHP/javascript and for the most part works. but in IE I have some javascript that doesn't, I know where it breaks but dont know how to fix function validate_cat(cat) { var http = false; if(navigator.appName == "Microsoft Internet Explorer") { http = new ActiveXObject("Microsoft.XMLHTTP"); } else { http = new XMLHttpRequest(); } // document.frmjob.selpri.list = 0; http.abort(); http.open("GET", "/logic/pri.php?cat=" + cat, false); http.onreadystatechange=function() { if(http.readyState == 4) { document.frmjob.selpri.options.length=0; document.getElementById('selpri').innerHTML = http.responseText; } } http.send(null); alert(document.frmjob.selcat.options[document.frmjob.selcat.selectedIndex].value); --> alert(document.frmjob.selpri.options[document.frmjob.selpri.selectedIndex].value); <-- alert(document.frmjob.oldcomp_by.value); validate_pri(document.frmjob.selcat.options[document.frmjob.selcat.selectedIndex].value, document.frmjob.selpri.options[document.frmjob.selpri.selectedIndex].value, document.frmjob.oldcomp_by.value); document.frmjob.selpri.focus(); } the arrows show what breaks. it seems that I cant use the index from a select list that has had its innerHTML reset, HELP please
  2. Hi, please can someone help, I am writing a PHP-GTK app and I dont have access to php-imap. So have got an fsockopen to connect to my imap server, but I dont know how I would read an email on the server. can I pass the server some commands?
  3. the SQL [code]inset into crm_update (crm_sql, crm_num) values('update h_job set job_user_id = '1', cat_id = '2', st_id = '1', ast_id = '', job_kb = '', job_complete_by = '1164747584', job_complete_on = '1164672000', pri_id = '2', job_acctioned = '1164733187' where job_id = '1'',0)[/code]
  4. OK, what i want to do is send a query to the database and if it succeds I want to input that query into a table. I cant get the query to work, my sql query is a molti line query and mysql does not like it. HELP!!
  5. [quote]Description array mysql_fetch_row ( resource result ) Returns a numerical array that corresponds to the fetched row and moves the internal data pointer ahead. [/quote] to use mysql_fetch_object then use $user->username;
  6. $data = mysql_query("SELECT * FROM shirts WHERE active='true' ORDER BY '$field','$direction'");
  7. try this: [quote]<?php include("database.php"); $userstable = mysql_query("SELECT * FROM users WHERE userid = '1'"); if (!$userstable) {   echo 'Could not run users query: ' . mysql_error();   exit; } $user = mysql_fetch_row($userstable); //testing echo $user[0]; echo $user[1]; ?> [/quote] you may need to edit the numbers to match the colum number. Also RTFM [url=http://uk.php.net/manual/en/function.mysql-fetch-row.php]http://uk.php.net/manual/en/function.mysql-fetch-row.php[/url]
  8. so what you need to do is, pass the page the user ID and in the page table have a user_id colum and query data database for the page ID where the user_id = the ID in the url I.E. page.php?id=1 [quote]$sql = mysql_query("select * from pages where user_id = '$id'");[/quote] also, is the page a file or data from the page table?
  9. Hi, I have been working on a help system and have got a lot of it done. But I am now stuck, I want to take a date/time stamp and see if it is the working day and if not then add hours and minuets to it to get a date/time stamp in the next day. but Ican see the logic, HELP ???
  10. you need to define 'p' at the start of your script, you also need to make sure that you dont output ANYTHING till you get to the 'header()' including empty lines.
  11. ok, if there is only 1 row for each player you could use the order by on that colum. but I dont understand what you are doing to get the MoTM  ???
  12. zawadi

    html links

    ok, I have an html file and I need to get the links in it out. But I dont know PHP well to do it, all I want is the HREF"" bit and the link text HELP please :)
  13. can you tell me if there is a new row for each MoTM for each player?
  14. I think you might need to check your code, it looks like you need to make sure that you have closed any if's. I would sugest that you put some echos in to see where you get to in the script.  :)
  15. the error you are getting is due to mysql ether not being setup in PHP or that PHP is old and does not have MYSQL turned on.  :(
  16. sorry, not in firefox. Firefox uses an html file to store all the bookmarks, but I just want to read the ancors in the html file.
  17. you would need to loop over all the tables in turn, to get the last 5 out [code]select * from table where date = 'daet here' limit 5[/code]
  18. do you gat any error messages?
  19. you will need to find out what colums you need to fill in, then use mysql_query("insert into <table> ") to input the data.
  20. ok, a bit of a strang thing, but I want to upload my firefox bookmark to my website and then import them in to a database. but I dont know how to get the info out of the file, can any one help me?
  21. Hi, I need some help please. I have just had a mysql database activated online, but I can only accsess it from my website online or the hosts copy of phpmyadmin. I need to move about 20MB and phpmyadmin hangs if i tyr the lot in 1 go. can any 1 help?
  22. try this: [code] $a_t_sql = "select  albums_ID , track_ID from albums_tracks"; $a_t_query = mysql_query($a_t_sql); $a_t_num= mysql_num_rows($a_t_sql); for($n=0;$n<$a_t_num;$n++){     $a_t_col = mysql_fetch_array($a_t_query);     $a_sql = "select * from albums where albums_id = '".$a_t_col[0]."'";     $t_sql = "select * from track where track_id = '".$a_t_col[1]."'";     $a_query = mysql_query($a_sql);     $a_col = mysql_fetch_array($a_query);     echo $a_col[album_name];     $t_query = mysql_query($t_sql);     $t_num= mysql_num_rows($t_sql);     for($nt=0;$nt<$t_num;$nt++;){         $t_col = mysql_fetch_array($t_query);         echo $t_col[track_name];     } } [/code]
  23. you cant use set in an insert statment, you need to write like this: [code] INSERT INTO user ( fullname, username, password, Email, DOB, phonenum) values( '$fullname', '$username', '$password', '$Email', '$DOB', '$phonenum') [/code]
  24. try this [code]$query_food = "SELECT s.* FROM stock s INNER JOIN stock_item i ON s.modelNum = i.modelNum WHERE i.prodName = '".$_POST[interest]."'; [code]
×
×
  • 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.