-
Posts
3,584 -
Joined
-
Last visited
-
Days Won
3
Everything posted by JonnoTheDev
-
http://swfupload.org/
-
str_replace($variable, "", $string);
-
[SOLVED] how to echo an image filename from sql?
JonnoTheDev replied to nashsaint's topic in PHP Coding Help
<?php echo "<img src='images/".$row_topThree['eng_img']."' />"; ?> -
you are missing a break; at the end of the case
-
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; } ?>
-
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
-
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.
-
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.
-
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"
-
Problem uploading images when they are big (not heavy)
JonnoTheDev replied to Perfidus's topic in PHP Coding Help
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. -
http://polishlinux.org/choose/comparison/?distro1=Fedora&distro2=Ubuntu
-
You can install both to the same pc
-
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
-
Is there any way to protect source code ?
JonnoTheDev replied to Dizzee15's topic in Javascript Help
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? -
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.
-
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
-
[SOLVED] Need help with comparing LIKE results
JonnoTheDev replied to pneudralics's topic in PHP Coding Help
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") ; ?> -
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.
-
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
-
http://www.sitepoint.com/article/guide-url-rewriting/
-
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 }
-
$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
-
Have you setup the domain correctly in the apache httpd.conf
-
You can upload the Zend Framework anywhere. It may already be available on your hosting package.