Jump to content

JonnoTheDev

Staff Alumni
  • Posts

    3,584
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by JonnoTheDev

  1. Is there any reason why you need to use AJAX to achieve this rather than just using PHP
  2. http://swfupload.org/
  3. str_replace($variable, "", $string);
  4. <?php echo "<img src='images/".$row_topThree['eng_img']."' />"; ?>
  5. you are missing a break; at the end of the case
  6. I think the post states php 5 but this isn't the point. The object should be responsible for returning the result set or a sub class method with access to the mysql resource. If you create a mysql resource within the object and then use mysql functions outside of the object scope using a class variable is just backwards. Like spaghetti code. i.e. <?php public function query($sql) { if($this->resource = mysql_query($sql, $this->connection)) { $this->numrows = mysql_num_rows($this->resource); } else { // throw query error } } public function resultSet() { $this->value = mysql_fetch_array($this->resource); return $this->value; } ?>
  7. This is an awful implementation for an object. It has no relation to any other system entity and would have been more efficient as a general function. i.e. you are setting a database resource inside the object and then accessing in the global scope with: // encapsulated in class function query_whereAll() { // ...... $this->resource = mysql_query($sql); } // global scope $date = mysql_result($topic->resource, $i, 'date'); This needs to be thought out a bit more
  8. You should focus on database design prior to any programming. A site like eBay will require a complex, efficient database design. If you don't know relational databases then this would be where I would start. Then learn how to connect to your database, select, insert, delete and edit records using Structured Query Language through PHP. Once you have a good grasp of this break the project down into its smaller parts and focus on what you require to complete each. For a site like eBay paper designs, documentation, system flow diagrams etc will be required before you even go near a keyboard.
  9. Just looks like a forum template. Nothing to critique. Also your CSS is bad. On a low res desktop you external links block at the top - where you have google ads, floats over the right edge of the main area. Make your browser window smaller and you will see what I mean.
  10. You must include a header to tell the email client that the email is in HTML format. See the post above. Also check that your email client is not in plain text. "Content-Type: text/html; charset=ISO-8859-1\r\n"
  11. I don't think this is possible as the PHP engine has terminated when the memory has been exhausted. In other words there is no memory left to do anything. Set the memory limit to a high amount or use imagemagick for image manipulation rather than the GD functions in PHP.
  12. http://polishlinux.org/choose/comparison/?distro1=Fedora&distro2=Ubuntu
  13. You can install both to the same pc
  14. Your home links should point back to the main url not index.php otherwise you end up with a duplicate content penalty as http://online-booking.5mservices.com/ is the same as http://online-booking.5mservices.com/index.php Google will see them as 2 different pages
  15. First of all you cannot see any php source code as it is parsed server side and displayed to the client as HTML or whatever. Secondly why would you ever need to stop a client from viewing the HTML / WAP or whatever source code in their browser?
  16. When you burn it to a CD, boot your computer with the CD. The installation will start. If you already have windows installed it will allow you to create a dual boot.
  17. What do you want to use linux for? If you want the X windows desktop then use any free distro i.e. Fedora Core, Centos, Ubuntu I would say the easiest to add new packages to are Fedora (rpms) and Ubuntu
  18. I have tidied this up for you <?php if(!$result = mysql_query("SELECT name FROM names WHERE name LIKE '%".mysql_real_escape_string(strip_tags(trim($_POST['name'])))."%'")) { die(mysql_error()); } $names = array(); while($row = mysql_fetch_array($result)) { // add each name to the $names array $names[] = $row['name']; } echo (count($names) ? "Results Found" : "No Results Found") ; ?>
  19. Link farms - bad idea. Get your site on DMOZ dmoz.org. Write articles and submit to article directories with your website link. Post your website to social bookmarking sites. This should get your ranking going.
  20. Its because all your input fields have the name author <input name="author" Use the correct names to match up to your $_POST array keys
  21. http://www.sitepoint.com/article/guide-url-rewriting/
  22. If this is at the very top of your script then the counter is set. $_SESSION['COUNTER'] = (is_numeric($_SESSION['COUNTER'])) ? $_SESSION['COUNTER']++ : 1; If you want to display the answers then you need to run a conditional statement on the counter value. i.e. display answers after 4 questions $_SESSION['COUNTER'] = (is_numeric($_SESSION['COUNTER'])) ? $_SESSION['COUNTER']++ : 1; if($_SESSION['COUNTER'] == 4) { // display answers } else { // display question }
  23. $items does not contain anything $write = fwrite($fp,$items); $write = fwrite($fp,$this->GetFeed()); $xml = new XML(); $xml->writeItems(); Also change the writeItems method to public
  24. Have you setup the domain correctly in the apache httpd.conf
  25. You can upload the Zend Framework anywhere. It may already be available on your hosting package.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.