Jump to content

ramli

Members
  • Posts

    53
  • Joined

  • Last visited

    Never

Everything posted by ramli

  1. I want to send a refresh command from my pop-up screen to a i frame in the parent document. I have written the following script: top.val.location.href= 'test.html';Where val is the name of the iframe. Can anyone help me pleace ? Thx in advance...
  2. I have a problem with my database structuere, and i am not sure how to resolve it. I have two tables. Users Username Password Role | | | | | Client_data Client_ID Username Location Zipcode Execute the following qurey SELECT * FROM Users INNER JOIN Client_data ON Users.Username=Client_data.Username Workes fine but when i like to search on username i get a error SELECT * FROM Users INNER JOIN Client_data ON Users.Username=Client_data.Username WHERE Username LIKE '%$search%' Error: #1052 - Column 'username' in field list is ambiguous I know it is a problem coused by the colomn username only i don't know wat to do to resolve it, can anyone help me pleace ? Thx in advance
  3. Looked it up in the dictionary and tryed.. SELECT * FROM gebruikers INNER JOIN klas ON gebruikers.Klas_ID = klas.Klas_ID WHERE (Gebruikersnaam LIKE '%test%' OR Voornaam LIKE '%test%' OR Achternaam LIKE '%test%' OR Tussenvoegsel LIKE '%test%' OR Klasnaam LIKE '%test%') AND Actief = '1' AND Gebruikersrol = '2' AND Jaar = '2009' and it works perfectly. Thx for the help.
  4. Could you pleace give me a example... my english ist that great... i dont know what a parenthesis is.. Thx in advance...
  5. I have the following querys: query1: SELECT * FROM gebruikers INNER JOIN klas ON gebruikers.Klas_ID = klas.Klas_ID WHERE Actief = '1' AND Gebruikersrol = '2' AND Jaar = '2009' query2: SELECT * FROM gebruikers INNER JOIN klas ON gebruikers.Klas_ID = klas.Klas_ID WHERE Gebruikersnaam LIKE '%raman%' OR Voornaam LIKE '%raman%' OR Achternaam LIKE '%raman%' OR Tussenvoegsel LIKE '%raman%' OR Klasnaam LIKE '%raman%' AND Actief = '1' AND Gebruikersrol = '2' AND Jaar = '2009' When i add the FIND to the query it ignores the Gebruikersrol, Actief and Gebruikersrol restriction and display's all records. I want to search the database with the restrictions in place. What am i doing wrong? any help will be much apreciated.
  6. Thx this is exacly what i was looking fore
  7. Hi all, I am trying to read a webpage source to get specific information. for exaple a webpage with the source: html>... head>.... body>.... Hellow my name is: #Value my lastname is : jordan And the name of my dog is <body..... and i want to read the #Value that is a variable value. so i need to create a sort of anker to select the value. i think i need to read every line, one line at a time. Then i need to recognise the sentence "Hellow my name is:". Next i need to select the value that recides inbetween ":" and "my". I have constructed the following script. But it can only tell me that the sentence is present. $url = 'http://www.test.test'; $needle1 = Hellow my name is:"; $contents = file_get_contents($url); if(strpos($contents, $needle1)!== false) { $var= 'yes'; } Can someone help me with the rest. Thx in advance....
  8. Hellow, I have a question concerning the script below: <script> function getval(inputname,iframename,formname,fmprvar) { getoption = document.+formname+.+inputname+.value top.frames[iframename].location = './formprocessor/FORMPROCESSOR.php?pageid='+ fmprvar +'&val=' + getoption; } </script> as you can see im trying to combine variables inside a document function. However this does not work. do any of u have a solution for this ? Thanx in advance
  9. Yes i have printed it to the screen and literary used that data to test the fixed string
  10. I have a problem and i hope that any of u can help me. while($r = mysql_fetch_array($Query)) { $data[0] = $r['name']; $data[2] = $r['type']; $data[3] = $r['link']; etc... if($_GET['check'] == "YES")// Validation { $myFile = $data[3]; $DBvar = $data[6]; unlink("$myFile") or die ("<BR> Could not delete file $myFile"); etc... The strangest thing happens. when i use unlink on for exaple "./files/upload/test.doc" it returns " Could not delete file ./files/upload/test.doc" but if i code it hard into my code for exapmle: $myFile ="./files/upload/test.doc"; $DBvar = $data[6]; unlink("$myFile") or die ("<BR> Could not delete file $myFile"); or unlink("./files/upload/test.doc") or die ("<BR> Could not delete file $myFile"); it works fine. I dont understand wy it works if it is a static var but not if it is a dynamic one. Can someone pleace help me with this problem ?
  11. I have a problem and i hope that any of u can help me. while($r = mysql_fetch_array($Query)) { $data[0] = $r['name']; $data[2] = $r['type']; $data[3] = $r['link']; enz... if($_GET['check'] == "YES")// Validation { $myFile = $data[3]; $DBvar = $data[6]; unlink("$myFile") or die ("<BR> Could not delete file $myFile"); enz The strangest thing happens. when i use unlink on for exaple "./files/upload/test.doc" it returns " Could not delete file ./files/upload/test.doc" but if i code it hard into my code for exapmle: $myFile = $data[3]; $DBvar = $data[6]; unlink("$myFile") or die ("<BR> Could not delete file $myFile");
  12. Try: Header: <script type="text/javascript"> function ex() { var x=confirm("Do you want to save your work ?") if (x) window.location="save.php"; else window.location="exit.php"; } </script> Body: <body onunload="ex();"> This will display a queystion if you want to save your work or not. i hope it will help u. ps: its not tested.
  13. I think can get it to work however im using a decryption that does not seem to work: <?PHP $Q_prop_select_item = mysql_query("SELECT AES_DECRYPT(prop_value,'$key') FROM {$prefix}prop WHERE prop_variable = '$dataholder'"); while($r2 = mysql_fetch_array($Q_prop_select_item)); { $Test = $r2['prop_value']; echo($Test."<BR>"); } ?> when i use it in phpmyadmin it works fine but if i echo it with php it returns nothing. what am i doing wrong ?
  14. if you put the application on a standalone pc it will only be vulnerable by physical tampering. however if it is on a internet connected pc you would be vulnerable to internet attacks, but that’s everyone connected to the internet so in souldent be any extra risk.
  15. You could use file_exists to validate the upload <?php $filename = '/path/to/foo.txt'; if (file_exists($filename)) { print "$filename exists"; } else { print "Het bestand $filename does not exists"; } ?>
  16. Depending on your formulation you can use somthing like this: <SCRIPT LANGUAGE="JavaScript"> <!-- start alert("Update Successfull") // end--> </script> Put this in a echo when your code is executed successfully
  17. hellow, I have created a function to readout values form a table. function GETPROPDATA($prefix) { $Q_prop = mysql_query("SELECT * FROM ".$prefix."prop"); while($r = mysql_fetch_array($Q_prop)) { $dataholder = $r['prop_variable']; $return[$dataholder] = $r['prop_value']; } return $return; } however the value data is encrypted with a AES layer. is it possible to decrypt every value without having to define eatch and everyone of them ?
  18. Yes and i apreciate all your help and that of others. however if i could simply figure it myself i would not think of asking any of the forum members. Better yet i would make it and post it for future reference for myself and all other forum members. And im not demanding a script just requesting help on making one. If you dont want to create it berhaps a other member will. And if you find it a incorrect question please report it to the moderators. If the decide it is incorret than it is my bad. Thanks for your help again.
  19. Thx for the evort i can alredy use your functions. Am i correct i assuming this only works for processing action concerning day's. is is possible to edit this functions to include month,years,minutes,seconds and hours. I would do it myself if i knew how but im quite new at this date thing..
  20. Your way works perfectly it isnt variable for exaple if i have to add a year it wouldt work. And it needs to be in a function so that in will be quickly accessible. You have alredy helped me alot but if you have any thoughts about a function i would gladly hear it.
  21. could you please give me a example of how this is done ?
  22. i need to be able to calculate with dates like 2007-04-18 - 2007-04-16 to be 2 (days). To achieve this i strtotime my variables so ik kan add them to echother however i alsow want to be able to add like in my exaple 2007-04-16 + 1 day is 2007-04-17.
×
×
  • 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.