
dotBz
Members-
Posts
39 -
Joined
-
Last visited
Never
Everything posted by dotBz
-
Hi there! I was wondering before if removing the 'user' password from a password-protected PDF is possble and I found PDFlib extension (not sure of the term) from pecl although I believe it isn't for free? Since when I used the samples, there were watermarks in the PDF files it generated. I tried PDFlib + PDI and works awesome except that it isn't for free. I also found fpdf + fpdi + fpdi_protection_128_pro although fpdi_protection_128_pro is also not available for free. I also found this although I was asked to search for a solution that uses PHP. Anyways, was wondering if you guys know of such that is for free. Thanks!
-
hi, any ideas how i can do this? insert data into table (table has an auto_increment id as 1st column) view the data that was inserted in another page redirected using header() So far, I have this: <?php $sql = sprintf("INSERT INTO table (data_1, data_2) VALUES ('%s', '%s');", 'data', 'data'); if (mysql_query($sql)) header("Location: another_page.php?id=" . mysql_result(mysql_query("SELECT * FROM table ORDER BY id DESC;"), 0)); ?> I'm sure there's a better way. Thanks in advance..
-
I think you it's recommended to disable register globals. Check out this link. And I don't think it is necessary to have register globals on when using "includes".
-
Hmm, it seems to work with others but not mine. It always logs my ip address.. I'll try it with my host..
-
Hi, just wondering why my counter doesn't work: <?php if (ini_set('auto_detect_line_endings', 1) === FALSE) { echo "ERROR: Cannot set ini file."; exit; } if ($ip = file('ipaddr', FILE_IGNORE_NEW_LINES)) { if (!in_array($_SERVER['REMOTE_ADDR'], $ip)) { if ($handle = fopen('ipaddr', 'a')) { fwrite($handle, $_SERVER['REMOTE_ADDR'] . "\n"); fclose($handle); } else echo "ERROR: Opening File."; } } else echo "ERROR: Reading file."; ?> The 'ipaddr' file contains this: 0.0.0.0 I think I'm having trouble w/ newlines.. Any help would be appreciated.. Thanks!
-
Hi, I was wondering how to do this. A paragraph of a certain article is printed out and there would be a link that directs to the actual article. Thanks in advnace..
-
$post problem, strip a word to only 3 characters....
dotBz replied to wmguk's topic in PHP Coding Help
remove the quote and dot to add the other variables, you could do this: $var = sprintf("%s%.3s%s%s", $login, mysql_real_escape_string($_POST['name_last']), $timestamp); not sure.. -
$post problem, strip a word to only 3 characters....
dotBz replied to wmguk's topic in PHP Coding Help
hmm. how about trying: sprintf("%.3s", $name_last); -
$pc = mysql_query($profilecomments) or die(); $senderid = $pc['id']; Same problem I guess.. the one you had a while ago :-\
-
try this: $fn = mysql_query($getfname) or die(); $friendname = mysql_result($fn, 0);
-
hmm. yeah, and put it on the very top of the script..
-
the messages are stored on privmsgs_text table
-
another is $query = "SELECT id FROM claim_details WHERE id='{$_GET['id']}';"; or there's probably an error in your sql query. try "echo $query", that could help
-
i guess it's used to identify a member variable or function of a class
-
that would be included in the html portion i guess :-\
-
http://www.php.net/is-numeric http://www.php.net/is-string http://www.php.net/strlen and regular expressions
-
hmm. may we see the source.. also do an "echo" of the query.. $sql = "SELECT * FROM table;"; echo $sql; that would help i guess
-
Hmm. Not sure what you exactly meant.. If I got the picture, you could probably do this: Store the date using strtotime(); $sql = "SELECT * FROM table WHERE date < " . strtotime("now") . ";"); $query = mysql_query($sql) while ($result = mysql_fetch_assoc($query) { ...do something } You want to retrieve the data w/ the date that has passed already right? :-\
-
I'd be glad to help.. Although I don't clearly understand the problem.. You want someone to write the whole scripts? Or have you started writing some already?
-
I got this: for ($i = 0; $i < 100; $i++) { echo str_pad($i, 4, "0", STR_PAD_LEFT) . "\n"; }
-
http://php.net/str_pad
-
I guess you could add this to the html page <meta http-equiv="refresh" content="5; url=somesite.com" /> That's what I do..
-
submit data from a form with the php script on the same page
dotBz replied to dazz_club's topic in PHP Coding Help
echo "<form method=\"post\" action=\"<? echo $_SERVER['PHP_SELF'] ?>\" >" ; i guess this should be echo "<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "\">"; -
hmm. just wondering.. maybe you could try print_r($_FILES['userfile']) to see if there are actually values in it.. :-\
-
http://php.net/sprintf Hope that helps..