Masna
-
Posts
288 -
Joined
-
Last visited
Posts posted by Masna
-
-
What is it that you're trying to do, exactly?
-
Try any one (or all three) of these ini-sets:
$your_site = "site.com"; //change this ini_set("SMTP","mail.".$your_site.".com"); ini_set("smtp_port","25"); ini_set("sendmail_from", "info@".$your_site.".com");
-
Good luck
-
or die(mysql_error());
Let us know what's printed.
-
There's a freelance forum here: http://www.phpfreaks.com/forums/index.php/board,8.0.html. Though what you're asking may not be much, it's still work. You'll probably have better luck finding someone to do this in the freelance forum whom you'll pay.
And, FrontPage? LOL!!!
-
$regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*><h2>(.*)<\/h2><\/a>";
-
-
That might be the weirdest thing I've ever seen.
Easter eggs own!
Weird? Yes. Awesome? Yes.
-
$regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*><h2>(.*)<\/h2><\/a>";
-
Just nest another while loop in the original outer loop. In this one, fetch the comments for each news item.
Also, I highly suggest making a separate <comment> tag to hold each new comment (as opposed to clumping them all together in one <comments> tag and joining them with |.
-
I was just working on some mods for an SM forum that I'm installing on my own site, and I came across this...
if (!empty($regOptions['check_reserved_name']) && isReservedName($regOptions['username'], 0, false)) { if ($regOptions['password'] == 'chocolate cake') fatal_error('Sorry, I don\'t take bribes... you\'ll need to come up with a different name.', false); fatal_error('(' . htmlspecialchars($regOptions['username']) . ') ' . $txt[473], false); }
Basically, when trying to register on an SM forum, if the username you enter is already in use and you enter the password 'chocolate cake', the error "Sorry, I don't take bribes... you'll need to come up with a different name." shows.
I thought that was quite hysterical, and so I felt the need to share.
Try it on this forum.
-
What is this event that you're waiting for?
AJAX is perfect for this: just keep looping a JavaScript check on an outside script.
-
Ok, so basically I don't need to worry that the 'field' name 'department' has multiple choices, it will take the 'value' assigned to whatever choice they select and populate the $to variable with the front-end of the email and complete it with the $your_site content.
For some reason I was thinking I had to deal with an array issue of some sort since it was a drop down selection with multiple choices under one group name. Guess that's not the case, eh?
Thanks for your response!
Yes, you are correct. You do not have to use an array here (and if you happen to come across a browser that sends an array of information when sending the value selected of a drop-down field, let me know).
-
Get rid of this line:
$headers .= "To: $name <".$email.">" . "\r\n";
-
$your_site = "mysite.com"; //change this $to = $_POST['department']."@".$your_site;
-
Masna,
Awesome, it works. And thanks for helping me get started on my library of porn terms to block! LOL
-John
-
Cool! Thanks. I think I need to read up on it to understand more, but yes, that's getting me where I want to be. Thanks!
You're going to chuckle when you understand what I did.
-
<?php foreach($string2 as $key=>$value){ if(substr($value, 0, 1) != "S") unset($string2[$key]); } for($i = 0; $i < count($string2); $i++){ echo "S"; } ?>
-
Do you think you can dumb that down a little for me
I don't think that's possible.
-
foreach($array_with_Rs_Ss_and_As as $key=>$value){ if(substr($value, 0, 1) != "S") unset($array_with_Rs_Ss_and_As[$key]); }
Apply the above where you'd like to remove elements that do not start with "S."
-
<?php function check_porn_terms($input){ $porn_terms = array("porn", "sex", "tits", "cock", "penis", "vagina", "pussy", "itakeithard", "hard_cock", "really_hard_cock", "suckmydickbitch", "fuck", "me", "good"); //add terms here foreach($porn_terms as $term){ if(substr_count($input, $term) > 0) return false; } return true; } if (isset($_POST['name']) && !empty($_POST['name'])) { mysql_connect("mysqlv3", "username", "password") or die(mysql_error()); mysql_select_db("sand2") or die(mysql_error()); if(!check_porn_terms($_POST['name'])) die("No porn!"); $table = mysql_real_escape_string($_POST['name']); $query = "CREATE TABLE `$table` (id INT(11) NOT NULL auto_increment, site VARCHAR(150) NOT NULL, votes_up BIGINT(9) NOT NULL, votes_down BIGINT(9) NOT NULL, PRIMARY KEY(id), UNIQUE (site))"; $result = mysql_query($query) or die(mysql_error()); } ?>
-
Can we see the code for this mysterious create_zip function?
-
Why are you putting everything in a loop? All of your header declarations should be outside of the loop. The only thing in the loop should be the readfile for each file (and whatever else you need to add each file to the .zip).
my mistake, moved them out of the loop and it still dont work...
Post your new code.
-
<?php //display the competitions $query = "SELECT comp_name FROM comps"; $result = mysql_query($query) or die('Error : ' . mysql_error()); $comp_names = array(); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $comp_names[] = $row['comp_name']; } $comp_names = array_unique($comp_names); foreach($comp_names as $comp_name){ ?> <p><?php echo $comp_name;?> - <a href="comp_view.php?comp_name=<?php echo(urlencode($comp_name))?>">View Entrants</a></p> <?php } ?>
password recovery
in PHP Coding Help
Posted
Are you md5 encrypting the passwords? If you are, you can't provide a password recovery feature: md5 is a one-way encryption.