Search Results

Showing results 1 to 27 of 27
Search took 0.01 seconds.
Search: Posts Made By: Will Gresham ; Forum: PHP and child forums
Forum: PHP 18 Days Ago
Replies: 2
Solved: Form Mailer
Views: 325
Posted By Will Gresham
I cannot see a call to the mail_it function in the code you posted, but what you will need to do is change the $recipient value that is being sent to the mail_it function depending on which option is...
Forum: PHP 34 Days Ago
Replies: 11
Solved: php code error
Views: 417
Posted By Will Gresham
That is an acceptable way to echo a variable within HTML code,

The problem is this line (Line 61):

<td><input type=text name=site value="<?=get_setting("site") size="20"?>" size=30></td></tr>
...
Forum: PHP Nov 1st, 2009
Replies: 4
Views: 284
Posted By Will Gresham
As Atli says, Blowfish is an encryption cipher, not a hashing algorithm.
It is in the mcrypt library (http://php.net/manual/en/book.mcrypt.php)

There was a whole thread a while back discussing...
Forum: PHP Nov 1st, 2009
Replies: 13
Views: 508
Posted By Will Gresham
Nope, for some reason they swapped them for mysqli, although if no connection is specified, it will default to that last connection that was established I believe. :)...
Forum: PHP Nov 1st, 2009
Replies: 4
Views: 232
Posted By Will Gresham
As ardav said, you will need to use the API:
http://rapidshare.com/dev.html
Forum: PHP Oct 30th, 2009
Replies: 3
Views: 295
Posted By Will Gresham
If you want to use preg functions, then this should work to match strings containing alphanumeric characters and spaces:

$pattern = '#^[a-z0-9\x20]+$#i';
if (preg_match($pattern, $new_pagealias))...
Forum: PHP Oct 26th, 2009
Replies: 7
Views: 291
Posted By Will Gresham
Remove the spaces between the %s and the value.

If the user entered 'Google' then the search query would look like:

$query = "SELECT * FROM products WHERE artist LIKE '% Google %'";

This...
Forum: PHP Oct 18th, 2009
Replies: 1
Views: 204
Posted By Will Gresham
Rather than using

$date = date("d-m-Y");

Save the date as a timestamp in an int(11) field, do not save dates as DATETIME, DATE or any other date specific SQL type..
Since this will be a...
Forum: PHP Oct 15th, 2009
Replies: 2
Views: 190
Posted By Will Gresham
This should work...


mysql_query("CREATE TABLE IF NOT EXISTS `table_name` (
`field_name` int(11) NOT NULL AUTO_INCREMENT,
`field_name` varchar(65),
...,
...,
...,
PRIMARY KEY (`field_name`)
Forum: PHP Oct 14th, 2009
Replies: 5
Views: 387
Posted By Will Gresham
function mapRefresh(timeoutPeriod) {
setTimeout(load(),timeoutPeriod);
}

Then add mapRefresh(10000) to the Onload event.
Forum: PHP Oct 14th, 2009
Replies: 50
Views: 2,156
Posted By Will Gresham
Again, off topic, but I think he is trying to get help for this (http://www.daniweb.com/forums/thread230007.html) still :P
Forum: PHP Sep 11th, 2009
Replies: 30
Views: 1,158
Posted By Will Gresham
Your script can be as secure or insecure as you want.

Generally, the end user would not see constants or any of the actual code as this is executed on the server. All the end user should see is...
Forum: PHP May 20th, 2009
Replies: 13
Solved: Help with query
Views: 495
Posted By Will Gresham
It should be

$query = "SELECT * FROM pec_mssgs WHERE m=$todaysMonth AND d=$todaysDay AND y=$todaysYear";


Edit: Ezzaral beat me to it :)
Forum: PHP May 2nd, 2009
Replies: 4
Views: 555
Posted By Will Gresham
Click (http://www.lmgtfy.com/?q=ajax+sortable+tutorial)

Plenty of guides (and ready made open source code) online if you actually search for it.
Forum: PHP Apr 4th, 2009
Replies: 7
Views: 508
Posted By Will Gresham
Looking at your code, I think you have your variables in a mix:

echo '<a href="' . $row['thumb']. '"><img src="' . $row['url']. '" /></a>';

Would output (for row 1)

<a href="001.jpg"><img...
Forum: PHP Feb 22nd, 2009
Replies: 5
Views: 372
Posted By Will Gresham
Have you tried echoing $addtolist to make sure that it contains the value expected?
Forum: PHP Feb 21st, 2009
Replies: 2
Views: 417
Posted By Will Gresham
Try

mysql_query("INSERT INTO `list` (`title`, `url`, `description`) VALUES ('$title', '$addtolist', '$description')");
mysql_query("DELETE FROM `spider` WHERE url='$addtolist'");
Forum: PHP Feb 20th, 2009
Replies: 12
Views: 973
Posted By Will Gresham
Had another look, you should define $directory as a global in the functions, just as the $thmb and $columns variables are.
Also, use a relative directory, change $directory =...
Forum: PHP Feb 13th, 2009
Replies: 4
Views: 389
Posted By Will Gresham
You should always check the data just before it is entered into the SQL query, especially with POST and REQUEST values, so it is not a bad idea to check this twice (even though you are using...
Forum: PHP Oct 19th, 2008
Replies: 3
Views: 684
Posted By Will Gresham
I beleive what he meant was this:
in your code (below with line numbers for reference) the loop is started on line 5 and ended on line 27, the <select> is started on line 12 and ended on line 24,...
Forum: PHP Oct 14th, 2008
Replies: 3
Solved: Empty a table?
Views: 2,245
Posted By Will Gresham
Make a script with something like:

$table="abc";
mysql_query("TRUNCATE $table");

This removes all entries from the table and resets the auto-increment to 0.

You could setup a Cron Job to...
Forum: PHP Oct 9th, 2008
Replies: 26
Solved: php email help?
Views: 1,541
Posted By Will Gresham
No, check line 28 of his sendemail.php script:

$attn = $_POST['attn'];

Also, he has been echoing the attn value and it is printing the correct item.
Forum: PHP Oct 8th, 2008
Replies: 2
Views: 337
Posted By Will Gresham
You can use a While statement to do this:

while($row=mysql_fetch_array($set)) {
//Processing of the returned row
}

This will loop through the same amount of times as rows returned and the...
Forum: PHP Oct 5th, 2008
Replies: 4
Views: 610
Posted By Will Gresham
The best way would be to obfuscate the code prior to uploading it to the server PC, by doing this there is no alterations needed to the operating system/accounts. Also, look at...
Forum: PHP Sep 30th, 2008
Replies: 2
Views: 392
Posted By Will Gresham
Please use the code tags to put code on here.

From the information you provided it would not be possible to tell you what the issue is:
1. You have not said what is and what is not working
2. In...
Forum: PHP Sep 24th, 2008
Replies: 2
Views: 532
Posted By Will Gresham
This is fairly simple, use the RAND function in the SQL query:

$sql = "SELECT * FROM tablename WHERE somefield='something' ORDER BY RAND() LIMIT 10";
Forum: PHP May 4th, 2008
Replies: 5
Views: 1,155
Posted By Will Gresham
try doing this:

// Then i would have the line here, to be run again - second instance
$result = mysql_query($sqlQuery,$connect);
if(mysql_num_rows($result)>0) {
//Process second instance
}...
Showing results 1 to 27 of 27

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC