-
Posts
3,584 -
Joined
-
Last visited
-
Days Won
3
Everything posted by JonnoTheDev
-
I bet that makes him feel much better. Although I was thinking exactly the same thing but was not going to post it.
-
I bet it won't be bad as a netbook OS.
-
The Apress books are very good. Some of them are focused towards advanced programming though. http://www.amazon.com/Pro-PHP-Security-Chris-Snyder/dp/1590595084/ref=sr_1_2?ie=UTF8&s=books&qid=1258129925&sr=8-2
-
That is not a solution. You must have a whitespace character somewhere if you havent output anything to the screen. often found after ?> tags in includes, which are hard to spot.
-
Im a bit confused with this OS. Are the applications / tools all Google apps that come packaged? Will all the software than can run on this OS come from Google or are companies developing software for it, or is it a linux derivative?
-
Opinions of my site, how could it be improved
JonnoTheDev replied to Renlok's topic in Website Critique
I would pay a designer. If your a developer stick to that. Design is for the arty farty creative types. -
On your first site I think your colour scheme, layout and content is very dull and boring. I am intrigued as in your portfollio you have the following site http://www.crew-agency.co.uk/ This is a really attractive and clean design although the font is a little small and am a bit stumped as to why your site has none of the creativity that another site on your portfollio has. The second link you posted looks like a standard wordpress template, nothing new. Most blogs look like this. Maybe a bit more colour on the module headers rather than the gray gradient.
-
it is 79KB Check the filesize using if($_FILES['uploadedfile']['size'] > 4000) { // file is too large } Your error handling is too vague. It is not telling you what is wrong.
-
How big is this file? This line will not do anything in your logic! <input type="hidden" name="MAX_FILE_SIZE" value="20000">
-
[SOLVED] String splitting and more help neended.
JonnoTheDev replied to mart94's topic in PHP Coding Help
<?php $value = "abcdefghijkl"; $newvalue = "afkx"; $array = array_unique(array_merge(str_split($value),str_split($newvalue))); sort($array); $x = implode("",$array); print $x; ?> -
if(@$_POST['submit']) if($_POST['submit']) Read through the following. http://www.tizag.com/phpT/fileupload.php Also code that processes data should be prior to any html. This is always best practice i.e. <?php // process post data if($_POST['submit']) { // validate } // html ?> <html> <body> <form> blah, blah, blah </form> </body> </html>
-
http://extplorer.sourceforge.net/
-
Not sure what you mean by referral systems. Do you mean tracking clicks from referral headers like google ads?
-
Yes however Decimal. If the price is 5.50 this is not an integer! You should not even allow the use to put a currency symbol in the price field. It should only be a number! You can validate this by using the following function. i.e. <?php if(!is_numeric($_POST['price'])) { echo "Invalid Price"; exit(); } ?> Just print the currency symbol next to the input field or if they can add a price in a different currency use radio buttons or a select list for the user to select their preferred currency.
-
There is no shorthand foreach syntax. You are talking about the following: <?php $x = array('a','b','c'); foreach($x as $i => $a): print $i."."; print $a."<br />"; endforeach; ?> The difference between <?php and <?= is that the second is a shorthand tag that also echos out to the screen. <?php echo "abc"; ?> is the same as <?= "abc"; ?> Hence you would not echo out a foreach construct so <?php foreach($x as $a) { ?> is used. In essence you should never use shorthand php tags, they are bad practice no matter what any tutorial states. Not all server configurations support them so you could end up modifying your whole application to use <?php
-
He didn't have a hockey mask on did hey and a big knife? Check his name's not Jason Voorhees
-
Read the massive sticky thread at the top of this forum http://www.phpfreaks.com/forums/index.php/topic,37442.0.html
-
how to attach a pdf file in email using php
JonnoTheDev replied to rahuul's topic in PHP Coding Help
Read the documentation, there are clear examples http://pear.php.net/manual/en/package.mail.mail-mime.example.php Make sure you have the PEAR libraries installed. http://pear.php.net/manual/en/installation.php -
PHP has no native support for UTF-8 character sets (think PHP6 will). This is why the code is of a bad design.
-
By adding it as an extra header. Read the function guide in the php manual & search text for bcc. http://uk2.php.net/manual/en/function.mail.php The code you have posted has no relevence.
-
You should not store the currency symbol in your database price field. Only the numeric value in a decimal data type. If you require multiple currencies use an ISO code in another field i.e GBP, USD, EUR and marry up to currency symbols within the application. When displaying the price add the correct currency symbol. The HTML for: £ is £ € is € $ is $ However when storing UTF characters in a mysql table you must set the encoding. This can be done easily by running the following query when connecting to your database: "SET NAMES UTF8"
-
<?php $table = '<table border="2" cellspacing="0" cellpadding="2"> <tr> <td><b>Account-ID</b></td> <td><b>Password</b></td> <td><b>E-Mail</b></td> <td><b>Add time</b></td> <td><b>Fraud</b></td> <td><b>Valid until</b></td> <td><b>AED</b></td> </tr> <tr> <td>11111111</td> <td>00000000</td> <td></td> <td>2009-11-13 08:30:01</td> <td><font color="green">No</font></td> <td>2009-12-13 08:30:01</td> <td>21</td> </tr> </table>'; function parseArray($string, $openTag, $closeTag) { preg_match_all("($openTag(.*)$closeTag)siU", $string, $matches); return $matches[0]; } $trArray = parseArray($table, "<tr>", "</tr>"); if(count($trArray)) { $tdArray = parseArray($trArray[1], "<td>", "</td>"); // display data print "Username: ".strip_tags($tdArray[0])."<br />"; print "Password: ".strip_tags($tdArray[1]); } ?>
-
how to attach a pdf file in email using php
JonnoTheDev replied to rahuul's topic in PHP Coding Help
Do not use the mail() function for email attachments! Use the PEAR::Mail_Mime library http://pear.php.net/package/Mail_Mime -
Trying to create a image upload script
JonnoTheDev replied to deansaddigh's topic in PHP Coding Help
This is not the correct code for file upload. You are missing a core function http://uk2.php.net/move_uploaded_file Follow this tutorial http://www.tizag.com/phpT/fileupload.php -
A framework library like zend is located in a directory on your server where all your projects can access it i.e. /usr/local/src/php/zend You web apps will include the parts of the framework they require to function i.e MVC libraries. The framework can be extended so your web apps can use the new functionality. CodeIgnitor is a deployed per site so upgrades cannot be done on a single library. A framework is not a CMS. A CMS can be built using a framework. Each web app should use its own database and should be an individual application. You would not have 1 codebase running multiple websites. Each website can be built using the functionality that the framework offers.