-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
Printing PDF file using PHP without prompting print dialog
MadTechie replied to wint.thaw's topic in PHP Coding Help
LOL, Oh yeah thats $2 please heeehee i'm happy to help -
[SOLVED] Please help! This is not code begging!
MadTechie replied to Delaran's topic in PHP Coding Help
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 -
and the error is....? EDIT: NM, i give, i'm out
-
Not exactly.. basically i have lost track of what your doing..
-
did you try my last suggestion? as you seams to of just used part of it (which would fail)
-
Printing PDF file using PHP without prompting print dialog
MadTechie replied to wint.thaw's topic in PHP Coding Help
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. -
please post your full code, as sections are missing
-
<?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
-
Open the Table (Structure) click Operations, see 'Table options' section enter new "auto_increment" click go
-
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!!
-
yep thats an error, not a valid command
-
[SOLVED] Explaination of what these lines of code do?
MadTechie replied to eqnastun's topic in PHP Coding Help
what are you trying to do anyways? -
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
-
ok, if you say so..
-
Cheers for the copy'n'paste heres the link extract
-
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
-
[SOLVED] Explaination of what these lines of code do?
MadTechie replied to eqnastun's topic in PHP Coding Help
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 -
ooowww.. wanna name the Book?
-
you need to edit your php.ini file session.cookie_lifetime session.gc_maxlifetime
-
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
-
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
-
please click solved!
-
use AJAX then edit: which is javascript
-
#1 read the rules #2 what code do you have so far?
-
session_start(); must be set before anything is printed to the screen i feel its the header("Location: vote.php"); messing it up..