-
Posts
1,469 -
Joined
-
Last visited
-
Days Won
12
Everything posted by CroNiX
-
That wouldn't be true unless you were running the code thats in the head with a onload event attached to the body. It IS completely loaded when the head is read, and that loads before your page. So you don't want to execute it until the body is loaded.
-
I see you are using short tags (<?). Try turning them into real php tags (<?php). Maybe your new host doesn't accept short tags. Always code with real tags
-
Should this: $this->ratings[$rrow['rating']] be this: $this->ratings($rrow['rating']) ??
-
place js in the <head> of your document.
-
OK, Im on my way out for a meeting with a client. Ill try to look later if you haven't figured it out.
-
well, your original $bolded_ids array does not contain 122, 123, 124 or 125, so they would not get affected...
-
Immediately after this line: <?php $category = $catalog->getCategoryInfo($core->pageVar('catID', siteCore::VARTYPE_INT)); Add: <?php echo "<pre>"; print_r($category); echo "</pre>"; what does it show?
-
Your bumping 5 mins after your original post?
-
That is really vague. Please expand on what you are trying to do...
-
Hello again, I recognize that code Font tags should not be used because they have been deprecated a long time ago. See http://www.w3.org/TR/html401/present/graphics.html section 15.2.2. Try using a span with a class name and use css. Its best to put the stylesheet in its own file. Also, it is a good idea to avoid color names like 'red'. Actually define them, #FF0000. Different browsers interpret color names differently. <head> <style ="text/css"> .redFont { color:#FF0000; } </style> </head> ... <span class="redFont">$subcatName</span>
-
You can use my above example to accomplish what you need.
-
Maybe this is closer to what you want...I removed a bunch of formatting as it was getting in my way, you can add it back as you need. In your while loop you started and ended your table, so there were many tables created. Then you had a table within a table. I removed one of them. Now you have 3 columns. 1) $row['Image'] 2) $row['Description'] 3) If there is a link print it, if not print a space (td's don't like to be empty, so put a space in there) oh, and always use full php tags, not <? short tags. <?php //select the table $result = mysql_query("select * from properties where Sale like '%yes%'"); echo '<table width="200" align="center" class="sample">'; //grab all the content while($row=mysql_fetch_assoc($result)) { ?> <tr> <td><img src="<?php echo $row['Image']; ?>" /><br><span><?php echo $row['hi_lite']; ?></span></td> <td><span><?php echo $row['Description']; ?></span></td> <td width="200" align="center" valign="middle" class="style3"> <?php if( $row['Web'] != "") { echo '<a href="'.$row['Web'].'" target="_self">click here</a>'; } else { echo " "; } ?> </td> </tr> <?php } // End While statement echo '</table>'; // Close database connection. //mysql_close(); ?>
-
extra semicolon echo '<script language="javascript">confirm("Must be numbers only!")</script>;'; }
-
Don't know if this has anything to do with it, but you have 2 anchor tags that you don't close.
-
[SOLVED] How to add PHP to Httpd.conf
CroNiX replied to shroomos's topic in PHP Installation and Configuration
Did you restart Apache after altering the httpd.conf? No you don't need both, you should just use php5. -
Maybe submit a sitemap through googles webmaster tools? I have the opposite problem. I run a site that is a forum and google/msn/yahoo are on there 24/7, most of the time there is more than one bot on at a time from the same company. I receive over 1000 unique visitors/day. I'm sure phpfreaks has a similar problem. They sure take a lot of bandwidth...
-
[SOLVED] Display information from the MySQL Database
CroNiX replied to topflight's topic in PHP Coding Help
No problem and good luck. Its not that hard once you get some concepts down. -
[SOLVED] Display information from the MySQL Database
CroNiX replied to topflight's topic in PHP Coding Help
while($data = mysql_fetch_assoc($mquery){ should be while($data = mysql_fetch_assoc($mquery)){ -
[SOLVED] Display information from the MySQL Database
CroNiX replied to topflight's topic in PHP Coding Help
My bad, I made an error... <?php ini_set('display_errors', 1); error_reporting(E_ALL); $query ="SELECT * FROM `news` ORDER BY `date` DESC LIMIT 5"; $mquery = mysql_query($query) or die(mysql_error()); //added this to see if problem with query $num = mysql_num_rows($mquery) or die(mysql_error()); //this tells you how many rows from your database were returned, not the actual data ?> <table width="10" border="1" cellspacing="0" cellpadding="0"> <tr> <th scope="row">Author Name</th> </tr> <tr> <th scope="row">Date</th> </tr> <tr> <th scope="row">Topic</th> </tr> <tr> <th scope="row">Articale</th> </tr> <?php if($num>0){ while($data = mysql_fetch_assoc($mquery){ //this was changed echo "<tr bgcolor=#EEEEEE>\n"; echo "<td>{$data["authorname"]}</td>\n"; echo "<td>{$data["date"]}</td>\n"; echo "<td>{$data["newstitle"]}</td>\n"; echo "<td>{$data["news"]}</td>\n"; echo "</tr>\n"; } } ?> </table> -
[SOLVED] Display information from the MySQL Database
CroNiX replied to topflight's topic in PHP Coding Help
change: $query = "SELECT * FROM `news` WHERE newstitle = '$newstitle'"; to: $query ="SELECT * FROM `news` ORDER BY `date` DESC LIMIT 5"; -
[SOLVED] Display information from the MySQL Database
CroNiX replied to topflight's topic in PHP Coding Help
whats its name? -
[SOLVED] Display information from the MySQL Database
CroNiX replied to topflight's topic in PHP Coding Help
@holics: foreach($mquery as $data){ topflight: do you have a date or timestamp column in your database so you can tell which the last 5 added were? -
[SOLVED] Display information from the MySQL Database
CroNiX replied to topflight's topic in PHP Coding Help
So you want to list all articles from the database and not one with a specific title? -
[SOLVED] Display information from the MySQL Database
CroNiX replied to topflight's topic in PHP Coding Help
How do I know what you are looking for? How are you using this? Is there a form or something where you select the newstitle that you are searching for? -
[SOLVED] Display information from the MySQL Database
CroNiX replied to topflight's topic in PHP Coding Help
its because of this line: $query = "SELECT * FROM `news` WHERE newstitle = '$newstitle'"; You use a variable called $newstitle, but it is not defined in the code that you posted.