Jump to content

anthelo

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Posts posted by anthelo

  1. Now my button is auto shown after 1min, how i can make it to be visablee after 0min & 41second

     

    <body>
        <button>My button</button>
    </body>
    ​
    function enableButton() {
        $("button").prop("disabled", "");
    }
    
    $(function() {
        var minutes = 1; // time to be disabled
        var time = minutes * (1000 * 60);
        
        $("button").prop("disabled", "disabled"); // Disable the button onload
        
        setTimeout(function() {
            enableButton();
        }, time);
    });​
    

     

    Live demo: http://jsfiddle.net/RrBKr/9/

     

    Regards

     

  2. Hello, i need some help from the experts.

     

    This is the code where im uploading the image on the server

    <script type="text/javascript" >
    $(function(){
    	var btnUpload=$('#upload');
    	var status=$('#status');
    	var uploadingfile;
    	new AjaxUpload(btnUpload, {
    		action: 'lib/image-store.php',
    		name: 'uploadfile',
    		onSubmit: function(file, ext){
    			 if (! (ext && /^(jpg|png|jpeg|gif)$/.test(ext))){ 
                        // extension is not allowed 
    				alert('Only JPG, PNG or GIF files are allowed');
    				return false;
    			}
    			status.text('Uploading...');
    		},
    		onComplete: function(file, response){
    			//On completion clear the status
    				alert('Image Uploaded');
    
    			//Add uploaded file to list
    			if(response==="success"){
    				$('<li></li>').appendTo('#files').html('<img src="./uploads/'+file+'" alt="" /><br />'+file).addClass('success');
    			} else{
    				$('<li></li>').appendTo('#files').text(file).addClass('error');
    			}
    		}
    	});
    
    });
    </script>
    

     

    Here is the code where i submit the data on the server

    <script type="text/javascript">
    
    $("#CSubmit").click(function(e) {
    
    	e.preventDefault(); 
        	var $form = $("#CForm"),
            fname	= $form.find('input[name="fname"]').val(),
            sname	= $form.find('input[name="sname"]').val(),
    	email 	= $form.find('input[name="email"]').val(),
    	phone 	= $form.find('input[name="phone"]').val(),
    	uid 	= $form.find('input[name="uid"]').val(),
    	description 	= $form.find('textarea#description').val(),
    	url 	= $form.attr('action');
    
    	$.ajaxSetup({async: false});
    	$.post('lib/user-store.php', 
    	{ fname: fname, sname: sname, email: email, phone: phone, description: description, uid: uid },
    		function(data) {
    			if (data == 'ok') {
    				$('#div1').hide();
    				$('#div2').show();
      alert(uploadingfile);
    
    			}
    		});
    
    return;
    
     });
    </script>
    

     

    Both of the are working, what i want to do is when uploading an image (code 1) to get the file name and submit them on mysql like the rest of the data (code 2)

     

    Regards

     

  3. Hello,

    What im trying to do is ''Featured Content Slider Using jQuery http://demo.webdeveloperplus.com/featured-content-slider/''

     

    When click on an thumb show in the content.

     

    Any help please, i could only make work the thumbs cant make the content

     

    	<div id="featured">
    
    	  <ul class="ui-tabs-nav">
    <?php 
    	$query = "SELECT * FROM tblnews AS tbln ORDER BY tbln.Id DESC LIMIT 4";
    	$result = mysql_query($query);
    	$tabID = array(1, 2, 3, 4);
    
    	foreach ($tabID as $id) {
    	$row = mysql_fetch_assoc($result);
    
    ?>
            <li class="ui-tabs-nav-item" id="nav-fragment-<?php echo($id);?>"><a href="#fragment-<?php echo($id);?>"><img src="<?php echo html_entity_decode($row['Thumb']);?>" alt="" /><span><?php echo html_entity_decode($row['Title']);?></span></a></li>
    <?php } ?>
    		</ul>
    <?php 		
    	foreach ($tabID as $id) {
    	$row = mysql_fetch_assoc($result);
    
    ?>
    
        <div id="fragment-<?php echo($id);?>" class="ui-tabs-panel">
    		<img src="<?php echo html_entity_decode($row['Thumb']);?>" alt="" />
    		 <div class="info" >
    			<h2><a href="#" ><?php echo html_entity_decode($row['Title']);?></a></h2>
    
    			<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla tincidunt condimentum lacus. Pellentesque ut diam....<a href="#" >read more</a></p>
    		 </div>
        </div>
    
    	<?php }  ?>
    
    
    
        </div>
    [code]
    
    

     

    Thank you

  4. Hello,

     

    What im trying to do is show under each category some pictures...

     

    I found this code and change it a little bit, but its still shows only one category and the images...

     

    Any suggestions how im gonna change it to show all my category's?

     

    <div id="PastProjects">Past Projects</div>
    <?php 
    
    $query = mysql_query("SELECT * FROM tbl_pastprojects");
    
    $counter = 0;//Use this as a way to ID data as it comes in.
    
    while($row = mysql_fetch_assoc($query))
    {	
    $catid[$counter] = $row['IssueId'];		
    $catname[$counter] = $row['Title'];                
    $Counter++;
    }
    
    $NumTimes = count($catid); //Establishing a number of times to run the second loop
    for($i=0; $i<=$NumTimes; $i++)
    {	
    $query1 = mysql_query("SELECT * FROM tbl_pastprojects_entries WHERE IssueId = ".$catid[$i]."");
    
    $c=0;//Another Counter for SubID's	
                    while($row = mysql_fetch_assoc($query1))	
    {				
    	$subid[$i][$c] = $row['Id'];		
    	$sname[$i][$c] = $row['Thumb'];                                
    	$c++;	
    }
    }
    //Now all of the Cats are stored in 2 Arrays(1 For name and 1 for ID) and SubCats are in 2 Multi Arrays(1 For name and 1 for ID)
    
    ///Generate Display
    for($j=0; $j<$NumTimes; $j++)
    {
    echo("<div id='PastProjectstitle'>");
    echo($catname[$j]);
    echo("</div>");
    //Establish Count for  sub cats
    $NumCats = count($subid[$j]);//This counts the second dimension of the array (which is the num of sub categorys for that particular category)
    echo("<div id='PastProjectsImages'>");
    //Loop through each SubCat
    for($k=0; $k<$NumCats; $k++)
    {
    	echo("<img src='".$sname[$j][$k]."' />");
    
    }
    	echo("</div>");
    
    }
    ?>
    
    

  5. Hello, im using ihwy - jQuery ListMenu Plugin http://www.ihwy.com/Labs/jquery-listmenu-plugin.aspx

     

    This code when you mouseover a letter (a,b,c...) its shows data...

     

    What i want is to stay always open dont hide every time im removing my mouse

     

    /*
    *
    * jQuery listmenu plugin
    * Copyright (c) 2009 iHwy, Inc.
    * Author: Jack Killpatrick
    *
    * Version 1.1 (08/09/2009)
    * Requires jQuery 1.3.2 or jquery 1.2.6
    *
    * Visit http://www.ihwy.com/labs/jquery-listmenu-plugin.aspx for more information.
    *
    * Dual licensed under the MIT and GPL licenses:
    *   http://www.opensource.org/licenses/mit-license.php
    *   http://www.gnu.org/licenses/gpl.html
    *
    */
    
    (function($) {
    $.fn.listmenu = function(options) {
    	var opts = $.extend({}, $.fn.listmenu.defaults, options);
    	var alph = ['_', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '-'];
    
    	return this.each(function() {
    		var $wrapper, list, $list, $letters, letters = {}, $letterCount, id, $menu, colOpts = $.extend({}, $.fn.listmenu.defaults.cols, opts.cols), onNav = false, onMenu = false, currentLetter = '';
    		id = this.id;
    		$list = $(this);
    
    		function init() {
    			$list.css('visibility', 'hidden'); // hiding to prevent pre-load flicker. Using visibility:hidden so that list item dimensions remain available
    
    			setTimeout(function() {
    				$list.before(createWrapperHtml());
    
    				$wrapper = $('#' + id + '-menu');
    				$wrapper.append(createLettersHtml());
    
    				$letters = $('.lm-letters', $wrapper).slice(0, 1); // will always be a single item
    				if (opts.showCounts) $letterCount = $('.lm-letter-count', $wrapper).slice(0, 1); // will always be a single item
    
    				$wrapper.append(createMenuHtml());
    				$menu = $('.lm-menu', $wrapper);
    				populateMenu();
    				if (opts.flagDisabled) addDisabledClass(); // run after populateMenu(): needs some data from there
    
    				bindHandlers();
    
    				// decide whether to include num and/or other links
    				//
    				if (!opts.includeNums) $('._', $letters).remove();
    				if (!opts.includeOther) $('.-', $letters).remove();
    				$(':last', $letters).addClass('lm-last');
    
    				$wrapper.show();
    			}, 50);
    		}
    
    		// positions the letter count div above the letter links (so we only have to do it once: after this we just change it's left position via mouseover)
    		//
    		function setLetterCountTop() {
    			$letterCount.css({ top: $('.a', $letters).slice(0, 1).offset({ margin: false, border: true }).top - $letterCount.outerHeight({ margin: true }) });
    		}
    
    		function addDisabledClass() {
    			for (var i = 0; i < alph.length; i++) {
    				if (letters[alph[i]] == undefined) $('.' + alph[i], $letters).addClass('lm-disabled');
    			}
    		}
    
    		function populateMenu() {
    			var gutter = colOpts.gutter,
    				cols = colOpts.count,
    				menuWidth,
    				colWidth;
    
    			if (opts.menuWidth) menuWidth = opts.menuWidth; // use user defined menu width if one provided, else calculate one
    			else menuWidth = $('.lm-letters', $wrapper).width() - ($menu.outerWidth() - $menu.width());
    
    			colWidth = (cols == 1) ? menuWidth : Math.floor((menuWidth - (gutter * (cols - 1))) / cols);
    			$menu.width(menuWidth); // prevents it from resizing based on content
    
    			$list.width(colWidth);
    
    			var letter, outerHeight;
    			$list.children().each(function() {
    				str = $(this).text().replace(/\s+/g, ''); // strip all white space from text (including tabs and linebreaks that might have been in the HTML) // thanks to Liam Byrne, liam@onsight.ie
    				if (str != '') {
    					firstChar = str.slice(0, 1).toLowerCase();
    					if (/\W/.test(firstChar)) firstChar = '-'; // not A-Z, a-z or 0-9, so considered "other"
    					if (!isNaN(firstChar)) firstChar = '_'; // use '_' if the first char is a number
    				}
    
    				outerHeight = $(this).outerHeight();
    
    				if (letters[firstChar] == undefined) letters[firstChar] = { totHeight: 0, count: 0, colHeight: 0, hasMenu: false };
    				letter = letters[firstChar];
    				letter.totHeight += outerHeight;
    				letter.count++;
    
    				$.data($(this)[0], id, { firstChar: firstChar, height: outerHeight });
    			});
    
    			$.each(letters, function() {
    				this.colHeight = (this.count > 1) ? Math.ceil(this.totHeight / cols) : this.totHeight;
    			});
    
    			var $this, data, iHeight, iLetter, cols = {}, c;
    			var tagName = $list[0].tagName.toLowerCase();
    			$list.children().each(function() {
    				$this = $(this);
    				data = $.data($this.get(0), id); iLetter = data.firstChar; iHeight = data.height;
    				if (!letters[l = iLetter].hasMenu) {
    					$menu.append('<div class="lm-submenu ' + iLetter + '" style="display:none;"></div>');
    					letters[iLetter].hasMenu = true;
    				}
    
    				if (cols[iLetter] == undefined) cols[iLetter] = { height: 0, colNum: 0, itemCount: 0, $colRoot: null };
    				c = cols[iLetter];
    				c.itemCount++;
    				if (c.height == 0) {
    					c.colNum++;
    					$('.lm-submenu.' + iLetter, $menu).append('<div class="lm-col c' + c.colNum + '"><' + tagName + ((tagName == 'ol') ? ' start="' + c.itemCount + '"' : '') + ' id="lm-' + id + '-' + iLetter + '-' + c.colNum + '" class="lm-col-root"></' + tagName + '></div>'); // reset start number for OL lists (deprecacted, but no reliable css solution). Creating an id to make lookups for appending list items faster
    				}
    				$('#lm-' + id + '-' + iLetter + '-' + c.colNum).append($(this));
    
    				c.height += iHeight;
    				if (c.height >= letters[iLetter].colHeight) c.height = 0; // forces another column to get started if this letter comes up again
    			});
    
    			$.each(letters, function(idx) {
    				if (this.hasMenu) {
    					$('.lm-submenu.' + idx + ' .lm-col', $menu).css({ 'width': colWidth, 'float': 'left' });
    					$('.lm-submenu.' + idx + ' .lm-col:not(:last)', $menu).css({ 'marginRight': gutter });
    				}
    			});
    
    			$menu.append('<div class="lm-no-match" style="display:none">' + opts.noMatchText + '</div>');
    			$list.remove();
    		}
    
    		function getLetterCount(el) {
    			var letter = letters[$(el).attr('class').split(' ')[0]];
    			return (letter != undefined) ? letter.count : 0; // some letters may not be in the hash
    		}
    
    		function hideCurrentSubmenu() {
    			if (currentLetter != '') $('.lm-submenu.' + currentLetter, $menu).hide();
    			$('.lm-no-match', $menu).hide(); // hiding each time, rather than checking to see if we need to hide it
    		}
    
    		function bindHandlers() {
    
    			// sets the top position of the count div in case something above it on the page has resized
    			//
    			if (opts.showCounts) {
    				$wrapper.mouseover(function() {
    					setLetterCountTop();
    				});
    			}
    
    			// kill letter clicks
    			//
    			$('a', $letters).click(function() {
    				$(this).blur();
    				return false;
    			});
    
    			$letters.hover(
    				function() { onNav = true; },
    				function() {
    					onNav = false;
    
    					setTimeout(function() {
    						if (!onMenu) {
    							$('a.lm-selected', $letters).removeClass('lm-selected');
    							$('.lm-menu', $wrapper).hide();
    							hideCurrentSubmenu();
    							currentLetter = '';
    						}
    					}, 10);
    				}
    			);
    
    			$('a', $letters).mouseover(function() {
    				var count = getLetterCount(this);
    				var $this = $(this);
    
    				if (opts.showCounts) {
    					var left = $this.position().left;
    					var width = $this.outerWidth({ margin: true });
    					if (opts.showCounts) $letterCount.css({ left: left, width: width + 'px' }).text(count).show(); // set left position and width of letter count, set count text and show it
    				}
    
    				var newLetter = $this.attr('class').split(' ')[0];
    				if (newLetter != currentLetter) {
    					if (currentLetter != '') {
    						hideCurrentSubmenu();
    						$('a.lm-selected', $letters).removeClass('lm-selected');
    					}
    					$this.addClass('lm-selected');
    
    					if (count > 0) $('.lm-submenu.' + newLetter, $wrapper).show();
    					else $('.lm-no-match', $wrapper).show();
    
    					if (currentLetter == '') $('.lm-menu', $wrapper).show();
    					currentLetter = newLetter;
    				}
    			});
    
    			$('a', $letters).mouseout(function() {
    				if (opts.showCounts) $letterCount.hide();
    			});
    
    			$menu.hover(
    				function() {
    					onMenu = true;
    				},
    				function() {
    					onMenu = false;
    					setTimeout(function() {
    						if (!onNav) {
    							$('a.lm-selected', $letters).removeClass('lm-selected');
    							$('.lm-menu', $wrapper).hide();
    							hideCurrentSubmenu();
    							currentLetter = '';
    						}
    					}, 10);
    				}
    			);
    
    			if (opts.onClick != null) {
    				$menu.click(function(e) {
    					var $target = $(e.target);
    					opts.onClick($target);
    					return false;
    				});
    			}
    		}
    
    		// creates the HTML for the letter links
    		//	
    		function createLettersHtml() {
    			var html = [];
    			for (var i = 1; i < alph.length; i++) {
    				if (html.length == 0) html.push('<a class="_" href="#">0-9</a>');
    				html.push('<a class="' + alph[i] + '" href="#">' + ((alph[i] == '-') ? '...' : alph[i].toUpperCase()) + '</a>');
    			}
    			return '<div class="lm-letters">' + html.join('') + '</div>' + ((opts.showCounts) ? '<div class="lm-letter-count" style="display:none; position:absolute; top:0; left:0; width:20px;">0</div>' : ''); // the styling for letterCount is to give us a starting point for the element, which will be repositioned when made visible (ie, should not need to be styled by the user)
    		}
    
    		function createMenuHtml() {
    			return '<div class="lm-menu"></div>';
    		}
    
    		function createWrapperHtml() {
    			return '<div id="' + id + '-menu" class="lm-wrapper"></div>';
    		}
    
    		init();
    	});
    };
    
    $.fn.listmenu.defaults = {
    	includeNums: true,
    	includeOther: false,
    	flagDisabled: true,
    	noMatchText: 'No matching entries',
    	showCounts: true,
    	menuWidth: null,
    	cols: {
    		count: 4,
    		gutter: 40
    	},
    	onClick: null
    };
    })(jQuery);
    
    

     

    Thank you

  6. Hello,

     

    im having a table 'requirements' with rows

    - Age (17,18,19,20,21,22,23,24,25+)

    - Keeper (Number 1 - 20)

    - Playmaker (Number 1 - 20)

    - Scorer (Number 1 - 20)

    - Winger (Number 1 - 20)

    - Defender (Number 1 - 20)

    - id (1 for one country 2 for other country)

     

    I want to check when a player is in the age {Age row} and {id row} is the same and then check the rest of the fields if its the same or better than the number i have on mysql do something

     

     

    Thank you

  7. @thorpe

    Let me explain..

     

    Im running the same script on 2 differents hosting servers, on my new server for some reasons im using imap.domain.com on my old just the domain.com for incoming and outgoing..

     

    The same script is running live on both servers  (old/new) ... my old server is working perfect on the new one is not sending the email like its supposed to be.

     

    Thats why im looking if there is any differences using pop3/imap and mail() function

     

    @MrXHellboy

     

    Thanks ill try that

     

     

    Thank you guys

  8. Hello,

     

    im using a contact form which sends me an email with the data name.. comments ..

     

    Now im testing a new better server which use IMAP (old POP3) and my form is not working like it used to be..

     

                    $emailTo = " $dbSentEmail"; //Put your own email address here
    	$emailServer = "noreply@totalsports.com.cy"; //Put your own email address here
    	$body = "Name: $name \n\nEmail: $email \n\nSubject: $subject \n\nComments:\n $comments";
    	$headers  = 'MIME-Version: 1.0' . "\r\n";
    	$headers .= 'Content-type: text/plain; charset=UTF-8' . "\r\n";
    	$headers .= 'From: Contact Form <'.$emailServer.'>' . "\r\n" . 'Reply-To: ' . $email;
    
    	mail($emailTo, $subject, $body, $headers);
    

     

    Any idea what i have to do to work like before?

     

  9. I'm building an article system, what im trying to do is when a user choose the article to be published tomorrow to able to.  Write today the article but the system will show it from tomorrow

     

            $gettoday = date("Y:m:d");
    $query = "SELECT * FROM tblnews WHERE MainArticle = 1 AND NewsDate = '".$gettoday."'  ORDER BY `Id` DESC LIMIT 1";
    $result = mysql_query($query);
    

     

    This is my code, but when i use this and the article is not posted for today is not showing anything.. any suggestions please?

     

    Thank you

  10. Hello,

     

    i want when click next button to show the 4 content ... ive try everything

     

     
                   <div id="MoreBoxBorder"><div id="MoreBoxBorderLine"></div></div>
    		   <div id="ArrowMoreBox"><a class="next browse right"><div id="ArrowMoreImage"></div></a></div>
    
    <?php
    $query = "SELECT *, date_FORMAT(Date, '%H:%i') as Date_Time FROM tblnews WHERE LatestNews = 1 AND Category != 10 ORDER BY `Date` DESC LIMIT 4";
    $result = mysql_query($query);
    while($row = mysql_fetch_assoc($result)) {  
    ?>					
                   <div id="MoreBox" id="comments">
                   <div class="box">
                                <a href="<?php echo BASE_URL;?>index.php?pid=article&artidread=<?php echo $row['Id'];?>"><img src="<?php echo html_entity_decode($row['Thumb']);?>" border="0"  width="110" height="64" /></a>
                                <strong><a href="<?php echo BASE_URL;?>index.php?pid=article&artidread=<?php echo $row['Id'];?>"><strong><?php echo html_entity_decode(substr($row['Title'],0,437));?></strong></a></strong>
                                <p><?php echo html_entity_decode($row['SubTitle']);?></strong>
    						<div id="MoreIcoBox">
    						<a href="<?php echo BASE_URL;?>index.php?pid=article&artidread=<?php echo $row['Id'];?>"><img id="MoreIco" src="<?php echo BASE_URL;?>images/news/more.png" border="0" /></a>
    						</div>
    
                    </div>
    		</div>
    
    <?php } ?>
    

     

    Like the image.. when i click next image will display another 4  (& auto scroll every 10seconds)

     

    Any help please

     

    Thank you

     

    [attachment deleted by admin]

  11. Hi,

     

    im trying when i click a link to show data(images) from specific category

     

    <script type="text/javascript">
    function showFrontPage(str)
    {
    if (str=="")
      {
      document.getElementById("txtHint").innerHTML="";
      return;
      }
    if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    xmlhttp.onreadystatechange=function()
      {
      if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
        document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
        }
      }
    xmlhttp.open("GET","index.php?pid=test.php?fpID="+str,true);
    xmlhttp.send();
    }
    </script>
    
    	<?php
    	$query = "SELECT * FROM tblfrontpage_categories ORDER BY Id";
    	$result = mysql_query($query);
    	while($row = mysql_fetch_assoc($result)) {  
    ?>
    <div id="FrontPageNavige">
    <form onClick="showFrontPage(this.<?php echo $row['Id'];?>);">
    <a  href="#"><?php echo $row['Name'];?></a>
    </form>
    </div> 
    <?php } ?>
    		   <?php
    			$query = "SELECT * FROM tblfrontpage WHERE Id = '".$_GET['fpID']."' ORDER BY Id LIMIT 12";
    			$result = mysql_query($query);
    			while($row = mysql_fetch_assoc($result)) {  
    			?>
    
                   <div class="boxFrontPage">
    		   <div><img src="<?php echo html_entity_decode($row['Thumb']);?>" border="0"  width="110" height="64" /></div>
                    </div>
    		   <?php } ?>
    

     

    what im doing wrong?

     

    Thank you

  12. Hello,

     

    im having problem with a simple table..

     

    I want the title and the conent do not have space.. if you can see on the picture on some cases is doing it (if the text is big)

     

    Any ideas?

          <div class="main mainRegular">
                <div class="boxBody" id="mainBody">
    
            <div id="mainNewsSoccer">
    	<div id="HomeNewsSoccerIMG"><div id="HomeNewsSoccerTitle"><?php echo MenuTitlePodosfero; ?></div></div>
    <?php
    $query = "SELECT *, date_FORMAT(Date, '%H:%i') as Date_Time FROM tblnews WHERE Category = 1 ORDER BY `Id` DESC LIMIT 4";
    $result = mysql_query($query);
    while($row = mysql_fetch_assoc($result)) {  
    ?>					
    
    <div class="small_item">
            <table border="0" cellspacing="0">
               <tr>
                 <td> </td>
                 <td> </td>
               </tr>
               <tr>
                 <td rowspan="2"><a href="<?php echo BASE_URL;?>index.php?pid=article&artidread=<?php echo $row['Id'];?>"><img src="<?php echo html_entity_decode($row['Thumb']);?>" border="0"  width="110" height="64" /></a></td>
                 <td style="max-height: 45px;" ><a href="<?php echo BASE_URL;?>index.php?pid=article&artidread=<?php echo $row['Id'];?>"><strong><?php echo html_entity_decode(substr($row['Title'],0,437));?></strong></a> <?php echo html_entity_decode(substr($row['Article'],0,700));?></strong><a id="mainNewsMore" href="<?php echo BASE_URL;?>index.php?pid=article&artidread=<?php echo $row['Id'];?>">...<?php echo goToArticle; ?></a></td>
               </tr>
            </table>
    </div>
    <?php } ?>
    
    	</div>
    </div>
    </div>
    CSS 
    

    .small_item

    {

    float: left;

    width: 280px;

    margin-left: 10px;

    margin-right: 10px;

    margin-top: 10px;

    max-height:190px;

    }

     

    
    

     

    [attachment deleted by admin]

  13. Hi, im trying to echo some mysql data. What i want to do is under a category show the articles that is for the specific category

     

    have a look at my attachment, the blue is where the categorys titles and below is supposed to show the different articles for the specific category.

     

    Here is my code

    				<div class="NewsCateg">
    				<div class="NewsCategBG">
    				<?php 
    				$query = "SELECT * FROM tblnews_categories WHERE ShortId != 0 ORDER BY `ShortId`";
    				$result = mysql_query($query);				
    				while($row = mysql_fetch_assoc($result))
    					{
    
    				?>
    				<div class="quartetin2">
    				<div id="HomeMoreNewsIMG2"><div id="HomeMoreNewsTitle2"><a href="summary.asp?catid=19167"><?php echo strtoupper($row['Name']);?></a></div></div>
    				<div id="HomeMoreNewsText">
    				<?php 
    				$query2 = "SELECT tblnews.Category, tblnews.Title, tblnews_categories.Id FROM tblnews LEFT JOIN tblnews_categories ON tblnews.Category = tblnews_categories.Id";
    				$result2 = mysql_query($query2);
    				while($row2 = mysql_fetch_assoc($result2)) {
    				?>
    <tr>
    	<td id="HomeLatestNewsDate"><li><?php echo strtoupper($row2['Title']);?></li></td>
    
    </tr>
    				<?php } ?>
    
    
    
    				</div>
    				</div>
    				<?php } ?>
        </div>
        </div>
    
    

     

    Any help please?

     

     

    Thank you

     

    [attachment deleted by admin]

×
×
  • 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.