
MDCode
Members-
Posts
640 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MDCode
-
Code For Adding Tax Total To My Php Shopping Cart
MDCode replied to smallc28's topic in Third Party Scripts
$price = "1"; $taxrate = ".06"; $gettax = $price * $taxrate; $total = $price + $gettax; -
Create A Form That Sends An Email To Addresses Inputted
MDCode replied to wbjtk's topic in Frameworks
It is very simply. There is no need for a database when emailing. To get going, look into the explode(), mail(), and date() functions. If you have any questions after first attempting I'm sure plenty of people are willing to help. -
Ok, now do you have a question?
-
Php goes line by line, by using echo $error it will always go to the last one set. If you wish to change it move it to the top
-
You need to add a / in the closing tag: [/code]
-
It was quite easy to bypass with a simple period, as well as words that are profane not being filtered at all.
-
Looks pretty secure to me, but then again I can't understand half the stuff on there because google translator sucks.
-
It is really hard to tell what error messages are or what you're looking for. Can you tell us what language it's in? (for google translating nonsense, but should help)
-
explode You aren't showing any code...unless that is it
-
Replace Character In Filename Directly In Ftp
MDCode replied to cedric_charles's topic in PHP Coding Help
Look into .htaccess url rewrite -
Upload File Script - Amend It To Check Size?
MDCode replied to mdemetri2's topic in Third Party Scripts
I assume you are just using if and no else to your code which would be the problem. The if function does not kill the script which makes it continue without stopping, you can either use die instead of echo or use an else { as so <?php if($_FILES["originalfilename"]["size"] > "2097152") { echo "File is over 2 MB"; } else { // execute everything else } ?> -
Just because $codes3 isn't set, doesn't mean that $codes1 is set. There's no way to tell by that snippet you've shown.
-
You can use javascript to determine the browser name, then adjust accordingly if it is. As far as I know, there is no detection for firefox browser in css.
-
I assume you are trying to display $reply? if so use require() then echo $reply into the img src
-
Upload File Script - Amend It To Check Size?
MDCode replied to mdemetri2's topic in Third Party Scripts
Sorry wrong byte amount 4 MB is 4194304 (won't let me edit >_<) -
Manixat's example should work.
-
Look into .htaccess
-
Upload File Script - Amend It To Check Size?
MDCode replied to mdemetri2's topic in Third Party Scripts
if(isset($_FILES["originalfilename"]["error"])) { echo $_FILES["originalfilename"]["error"]; // or use an else here instead die; } When using this method you will get an error code. A full list of error codes can be found at http://php.net/manua...load.errors.php You can change the error by doing something like if($_FILES["originalfilename"]["error"] == "1") { echo "Your custom message here"; } You can also check the size of the uploaded file with $_FILES["originalfilename"]["size"] And set a max size (for example 4 MB) if($_FILES["originalfilename"]["size"] > "4000000") { echo "File is over 4 MB"; } -
You're using backticks around your number Edit: lol same time posting as pikachu
-
You can not put html inside of php tags. Use echo before html because right now you should be getting syntax errors
-
Sigh...It's not hard at all. In fact I shouldn't really even do it if you don't even know the echo function. I suggest going http://www.w3schools...php/default.asp for a good start. But I suppose I'll help anyways: <?php if(isset($codes3)) { echo " <br /> <div id='codedisplay_box' style='overflow: auto;'><code><xmp> $codes3</xmp></code></div> <br />"; } ?>
-
<img src="Communication_socket.php" alt="" border = "5"> php is not an image file.
-
<?php if(isset($codes3)) { // execture that it does have a value } else { // It does not have a value } ?>
-
I would suggest looking into using an ajax/jquery request to call a php script that updates the time (makes it a lot easier). But either way, it should work. Then use something like the following: <?php $nextMonth = time() + (30 * 24 * 60 * 60); $twoMonths = time() + (60 * 24 * 60 * 60); $threeMonths = time() + (90 * 24 * 60 * 60); echo "In one month it will be $nextMonth"; echo "In two months it will be $twoMonths"; echo "In three months it will be $threeMonths"; // you get the idea hopefully. ?> I'm not sure by what you mean "isn't working at all" but if you mean it isn't updating at all, try changing REQUEST to GET
-
Cron jobs would work good, just make a php script that checks and emails.