Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. LOL, Oh yeah thats $2 please heeehee i'm happy to help
  2. OK steps #1, Query the database and echo all company names #1.1, modify to echo as hyperlinks ie <a href="edit.php?cid="..$row['id']">$row['cname']</a> #1.2 NOTE: i used cid= id (this will be UID) 2.0 (the edit.php side) 2.1 create a 2nd file called edit.php design as a form (this will be for updating) 2.2 use $_GET['cid'] you get the id from 1.1 and select * from table where id = $_GET['cid'], this returns the record you selected. 2.3 now edit your edit.php form to set the default values to the data from the database 2.3.1 remember to add a hidden field and set the default to the $_GET['cid']. 2.4 now add a button called update and a extra block of code if(isset($_POST['update'])) { //update table set cname =$_POST['cname'] etc etc WHERE id = $_POST['cid'] } thats the basic build any questions ? (please use ref numbers) EDIT updated id to cid
  3. and the error is....? EDIT: NM, i give, i'm out
  4. Not exactly.. basically i have lost track of what your doing..
  5. did you try my last suggestion? as you seams to of just used part of it (which would fail)
  6. lookup javascript in PDF's you can create one to print on opening and then have the pdf opened via a frame. this would then automatically print.
  7. please post your full code, as sections are missing
  8. <?php <input name="cbUnit[]" type="checkbox" value="Talon">Talon<br> <input name="cbUnit[]" type="checkbox" value="Star">Star<br> <input name="cbUnit[]" type="checkbox" value="Cater">Cater<br> <input name="cbUnit[]" type="checkbox" value="Landrum">Landrum<br> ?> <?php session_start(); $_SESSION['cbUnit'] = $_POST['cbUnit']; $sticky_cbUnit = ( (in_array($_SESSION['cbUnit'], 'Talon') )?' checked="checked" ':' '; //Note: the comparison is done in a case-sensitive manner. echo '<input type="checkbox" ' . $sticky_cbUnit . ' name="cbUnit[]" value="Talon" />'; ?> Talon<br> EDIT: Click Solved Bottom left
  9. Open the Table (Structure) click Operations, see 'Table options' section enter new "auto_increment" click go
  10. Yeah - the salt would have to be the encrypted password which is stored in plain text for a hacker to use as a salt against the encrypted information, the only thing stopping a hacker would be the lack of knowledge that the information is salted with the encrypted password. No the USERS password would be the password to the data related to that client, their be no point using something thats stored in the system!!
  11. yep thats an error, not a valid command
  12. what are you trying to do anyways?
  13. you seam to not understand and jusr seam to repeat yourself, i have no time for this the only way your get what your trying to do to work is by getting php to parse the file and then echo to the screen, i think you need to learn a little more as the end result will still not work as you expect but good luck anyways
  14. ok, if you say so..
  15. Cheers for the copy'n'paste heres the link extract
  16. you lost me but from what i can see .html?var will not work.. as a html file can't handle variable, anyways what do you mean by "but how do we push it down the code until it gets to closing body tag </body>" maybe regex is a better solution
  17. get_superdkp is a function, not part of php's default function list so it must exist in the project somewhere search for "function get_superdkp(" *note it could be in an included file as for the rest its pulling data from an mySQL database
  18. ooowww.. wanna name the Book?
  19. you need to edit your php.ini file session.cookie_lifetime session.gc_maxlifetime
  20. if a hacker gets in, then (s)he will have access to the decryption method used (and password), i guess SSL would be a good idea, one *idea* to protect the records of a client you could encrypt their data with their password and have their password stored using sha1 or md5 (chaning password would then need to decrypt and re-encrypt their encrypted data) probably got some holes in that idea but still, its a thought
  21. try <?php session_cache_expire(30); session_start(); $_SESSION['test'] = "test"; ?> EDIT: ini_set('session.cookie_lifetime', '30'); may also work OR in you .htaccess. php_value session.gc_maxlifetime 300 php_value session.cookie_lifetime 300
  22. please click solved!
  23. use AJAX then edit: which is javascript
  24. #1 read the rules #2 what code do you have so far?
  25. session_start(); must be set before anything is printed to the screen i feel its the header("Location: vote.php"); messing it up..
×
×
  • 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.