php question

Soldato
Joined
16 Oct 2007
Posts
7,480
Location
UK
I have a script that feeds another script

I've added something to the first script (page URL)
and now i want to implement it into the second script

Trial and error isn't working for me...... anyone mind having a look please?

The new bit is the bit that shows you the URL of the page... in the href tags


Code:
<p style="font-family: arial, 'lucida console', sans-serif;font-size: 12px">
<?

//error_reporting(0);

function getLatestJobPostings(){

  include("jobs_config.php");

	
	mysql_connect($DBHost,$DBUser,$DBPass); 
	mysql_select_db($DBName); 
	
	$strQuery="
	SELECT ".$DBprefix."ext_postings.title," .$DBprefix."ext_postings.id,".$DBprefix."ext_employers.company FROM ".$DBprefix."ext_postings," .$DBprefix."ext_employers WHERE ".$DBprefix."ext_postings.expires>".time()." AND ".$DBprefix."ext_postings.active='YES' AND " . $DBprefix . "ext_postings.employer=" .$DBprefix."ext_employers.username order by ".$DBprefix."ext_postings.id desc limit 10"; //echo $strQuery;
	
	$result=mysql_query($strQuery);
	echo "<table cellpadding=2 cellspacing=1><tr><td><b>Job Title</b></td><td><b>Company</b></td></tr>";
	while($row=mysql_fetch_array($result))
	{
		echo "<tr>";
		echo "<td>[COLOR="Red"]<a href=\"index.php?mod=search&job=" . $row['id'] . "\">" . $row['title'] . "</a>[/COLOR]</td><td>" . $row['company'] . "</td>";
		echo "</tr>";
	}
	echo "</table>";	

}
 
?>
</p>

<?PHP 
getLatestJobPostings();
?>

and this is the bit where i need to put the URL link - replacing the email address

Code:
<?php echo '<?xml version="1.0" encoding="UTF-16"?>'; ?>

<!DOCTYPE ticker SYSTEM "config.dtd">
<ticker>
	<config>
		<!-- Configuration of the top bar -->
		<top>			
			<font>
				<fontFace>Arial</fontFace>
				<fontSize>12</fontSize>
				<fontColor>5080c1</fontColor>
			</font>
			<url>
				<!-- target of the link -->
				<target>_blank</target>
				<!-- font color when the mouse is over the link -->
				<aFontColor>faae00</aFontColor>
			</url>
			<bgTop>
				<bgTopHeight>28</bgTopHeight>		
				<bgTopColor>edf4fc</bgTopColor>
				<barTopHeight>4</barTopHeight>
				<barTopColor>edf4fc</barTopColor>
			</bgTop>
			<!-- the speed of the scrolling, select a value from 1 to 10  -->
			<speed>9</speed>
			<!-- space between the items -->
			<spacing>80</spacing>
			<!-- the news -->
			<news>
			   <?php while($row=mysql_fetch_array($result)) {?>
				<item>		
					<text><?php echo $row['company']." : ".$row['title']; ?></text>
					<link>[COLOR="Red"]email[/COLOR] </link>
				</item>
				<?php } ?>
			</news>
		</top>		
		<!-- Configuration of the bottom bar -->
		<bottom>
			<font>				
				<fontFace>Impact</fontFace>
				<fontSize>11</fontSize>
				<fontColor>ffffff</fontColor>
			</font>			
			<url>
				<!-- target of the link -->
				<target>_blank</target>
				<!-- font color when the mouse is over the link -->
				<aFontColor>ffffff</aFontColor>
			</url>
			<bgBot>
				<bgBotColor>99ccff</bgBotColor>
				<barBotHeight>3</barBotHeight>
				<barBotColor>276C23</barBotColor>
			</bgBot>
			<!-- the speed of the scrolling, select a value from 1 to 10  -->
			<speed>5</speed>
			<!-- space between the items -->
			<spacing>20</spacing>			
			<news>
				<item>		
					<text>Police: Indonesia bombing kills 19 !!!</text>
					<link>[email protected]</link>
				</item>
				<item>		
					<text>First heat advisory for Seattle area!</text>
					<link>http://www.tufat.com</link>
				</item>
				<item>		
					<text>Bush: Base closings painful but crucial!</text>
					<link>http://www.tufat.com</link>
				</item>
				<item>		
					<text>Your news here :: Title 4</text>
					<link>http://www.tufat.com</link>
				</item>
				<item>		
					<text>Your news here :: Title 77</text>
					<link>http://www.tufat.com</link>
				</item>
			</news>
		</bottom>
	</config>
</ticker>
 
Last edited:
Back
Top Bottom