-
Posts
5,717 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Adam
-
You could still upload the file with PHP, but just not copy it from temporary memory? Obviously then you can take the file path info from the $_FILES array and store it in a database or, however you plan to store the data.
-
Ahh! If you have a pretty large amount of emails in an array like in your original code, you could use: $mails[1] = "test1@teste.com"; $mails[2] = "test2@teste.com"; $mails[3] = "test3@teste.com"; $mails[4] = "test4@teste.com"; foreach ($mails as $email) { $mail->AddBCC($email); }
-
What do you mean by this? If it's not working, what error are you getting? What is actually happening?
-
Just spotted problem I think, change: while(list($subcat_id, $subcategory2)=mysql_fetch_array($subcategory2)){ To: while(list($subcat_id, $subcategory2)=mysql_fetch_array($result)){
-
$result = mysql_db_query($dbname,"SELECT `subcat_id` FROM subcategory2 WHERE `subcat_id` != '$val2' AND subcat_id LIKE '$val%' ORDER BY `subcategory2` ") or die(mysql_error()); ... if no error is returned try printing out the SQL: print "SELECT `subcat_id` FROM subcategory2 WHERE `subcat_id` != '$val2' AND subcat_id LIKE '$val%' ORDER BY `subcategory2` ";
-
$to = 'blabla@bla.com,another@who_ever.com'; $to = 'blabla@bla.com, another@who_ever.com'; Perhaps?
-
I went to grab a coffee in between replying and didn't see your reply at first, but I was going with that there weren't spaces between the email address? I'm not sure how tight PHP is with this?
-
What work have you done on it so far? This may be better suited in the freelance forum?
-
[SOLVED] simple 4 U.. I'm new... going to scream!!!!!
Adam replied to kcotter's topic in PHP Coding Help
Any time, just mark the topic as solved if all your issues have been... solved. -
There's probably a function to produce random decimals, but you could use: $damage = number_format(rand(1, 999), 2, '.'); .. not tested.
-
EDIT: Redarrow's onto it!
-
[SOLVED] simple 4 U.. I'm new... going to scream!!!!!
Adam replied to kcotter's topic in PHP Coding Help
Looking at your mail function: mail("kalcotter1@yahoo.com", "Someone Registered at BuyWithoutDebt", $name, "From: BuyWithoutDebt"); It's probably safer in that respect to use an email for the "From:" header, and also add a reply-to email address (even if it's noreply@...) - this may stop the long ugly email address showing. Something like: mail("kalcotter1@yahoo.com", "Someone Registered at BuyWithoutDebt", $name, "From: BuyWithoutDebt@example.com\r\nReply-To: noreply@example.com\r\n"); -
[SOLVED] Include file from a different folder
Adam replied to ontwerpexpert.nl's topic in PHP Coding Help
You may have some configuration forcing it not to work. Try: include './../footer.php'; -
[SOLVED] simple 4 U.. I'm new... going to scream!!!!!
Adam replied to kcotter's topic in PHP Coding Help
Add something like: if (empty($_REQUEST['name']) || empty($_REQUEST['email'])) { die('Enter name and email...'); } Before creating the $name var. .... or better yet: <?php print "Thank you $name for registering to win!"; if (empty($_REQUEST['name']) || empty($_REQUEST['email'])) { print 'Enter name and email...'; } else { $name = "Name: ".$_REQUEST['name']."\n" ."Email: ".$_REQUEST['email']."\n" ."Address: ".$_REQUEST['address']."\n" ."City: ".$_REQUEST['city']."\n" ."State: ".$_REQUEST['state']."\n" ."Zip: ".$_REQUEST['zip']."\n" ."How they heard about us: ".$_REQUEST['hear']; mail("kalcotter1@yahoo.com", "Someone Registered at BuyWithoutDebt", $name, "From: BuyWithoutDebt"); } ?> -
[SOLVED] simple 4 U.. I'm new... going to scream!!!!!
Adam replied to kcotter's topic in PHP Coding Help
Try this: $name = "Name: ".$_REQUEST['name']."\n" ."Email: ".$_REQUEST['email']."\n" ."Address: ".$_REQUEST['address']."\n" ."City: ".$_REQUEST['city']."\n" ."State: ".$_REQUEST['state']."\n" ."Zip: ".$_REQUEST['zip']."\n" ."How they heard about us: ".$_REQUEST['hear']; -
I can't see any reason why it wouldn't work, but you're going a round-about way of doing it. You could just put $cert straight into the in_array() function, removing the need for: $num = count($cert); for ($i=0; $i >= $num; $i++) { $id[] = $cert[$i]; }
-
Perhaps show us the SQL, bit more code?
-
$prep1 = mysql_query(" update contacts set phone = replace(phone, ' ', ''), phone = replace(phone, '-', ''), phone = replace(phone, '(', ''), phone = replace(phone, ')', '') ");
-
I think there's a good opportunity for some humor, if it's done right, but I think it would be really hard to build up a user base with what Ken2k7 said. I'd suggest following everyone's advice with centering it, better color scheme and graphics etc, and also making the links more obvious and adding a rollover effect.
-
Yeah, it's processed server side so it doesn't matter which browser they are using.
-
Also take a look at the advertising services Facebook offers, and the range of departments they employ: http://www.facebook.com/advertising/ http://www.facebook.com/careers/ I'm assuming PHPFreaks just doesn't have anywhere near this at hand...
-
Viewing only certain type of Inventory from inventory.php
Adam replied to gamerzfuse's topic in Third Party Scripts
Yeah after a quick look on Google, seems isset() can be a little undependable for certain situations. -
Viewing only certain type of Inventory from inventory.php
Adam replied to gamerzfuse's topic in Third Party Scripts
Redarrow means here: $sSql = ($_GET['type']) ? .... You can safely just use the above code, but I guess for coding standards it's better to use isset(): $sSql = (isset($_GET['type'])) ? .... I'm not really sure what the general opinion on this is? -
Viewing only certain type of Inventory from inventory.php
Adam replied to gamerzfuse's topic in Third Party Scripts
mysql_real_escape_string() is just preventing someone from injecting their own SQL - more about XSS. You'd pass the type var through the URL: http://craighooghiem.com/goodwills/final/inventory.php?order=type&ordertype=DESC&type=Cars (Or something) .. Then you retrieve the value in the PHP with $_GET['type'].