PHP - Code Is Spitting Out Some Retarded Title Array? Rofl
Code: [Select]
$DB->query("SELECT g_title from ibf_groups where g_title NOT IN ('Validating','Guests') order by g_title"); while($group = $DB->fetch_row()){ $data[] = $group['g_title']; } echo $data[0]; var_dump($data); var dump Code: [Select] 'TITLE' => string 'Validating' (length=10) 'ICON' => null 0 => string 'Admin' (length=5) 1 => string 'Donor' (length=5) 2 => string 'Loser' (length=5) 3 => string 'Members' (length=7) 4 => string 'Members+' (length=8) 5 => string 'Moderator' (length=9) 6 => string 'Senior Moderator' (length=16) how do I get rid of Validating? and ICON? Similar TutorialsCode: [Select] $color = ' class="pin"'; $pin++; echo $pin; long story short, let's just say, this is inside a while loop echoing out my forum Topics. $pin echo's out 1 2 3, because they're 3 stickied Topics. I only want class="pin" to display on the very last <tr> tag. (which would be number 3, how?) Code: [Select] <tr<?php echo $color ?>> OK i do Code: [Select] if ($pin == 4){ $color = ' class="pin"'; }works if I have 4 Topics, stickied, but how would i change 4 to be dynamic? what if only 2 topics stickied? I tried Code: [Select] if ($pin == $pin){ $color = ' class="pin"'; } not work.. wouldn't $pin = 4? bcz $pin++ ? my help topics seem so noob, but i just cant comprehend lol This is what I have all it does is come up with blank page I've been working on this for 8 hours with no change looked everywhere no idea what to do. Code: [Select] <?php // Connects to your Database mysql_connect("localhost", "name", "password") or die('Error: '.mysql_error()); mysql_select_db("database") or die(mysql_error()); if(isset($_COOKIE['ID_my_site'])) { //$username of login user $username = $_COOKIE['ID_my_site']; $pass = $_COOKIE['Key_my_site']; $check = mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error()); while($info = mysql_fetch_array( $check )) { //fname is the first name of login user Print "<b>Name:</b> ".$info['fname'] . " "; }} ?> my database is all on one table id | username | password | fname | lname 1 | unsernam1 | **** | John | Doe 2 | unsernam2 | **** | Amy | Jane 3 | unsernam3 | **** | Doug | Smith I want it so that when the new page upons it finds the username (Like usernam2) in database and prints out the users first name etc in. Help? Hi any clues as to why this doesn't work, probably real simple having a slow day. <?php $ReportType = mysql_real_escape_string($_GET['ReportType']); $sql = "SELECT id, username, score, class, Banned FROM users WHERE is_active = 1 ORDER BY $ReportType DESC LIMIT 25"; $query = mysql_query($sql) or die(mysql_error()); $i=0; while($users = mysql_fetch_array($query)) { $i++; ?> Everytime I make an announcement/post with a link like so: "This is an announcement with the following link: <a href="http://www.blah.asp">link</a>" It never goes to the actual webpage. It always goes to a "not found" page on my website like so: http://mywebsite.com/"http://www.blah.asp/" Hi guys! How do I display different code depending on the title/url? This is the code for the form that brings you from "http://www.xxx.uk/index.php" to "http://www.xxx.uk/index.php?name=ro": Code: [Select] <form name="input" action="http://www.xxx.uk/index.php?name=ro" method="post"> Enter student number:<input type="text" name="sid"/> <input type="submit" value="Submit"> Now when you are on "http://www.xxx.uk/index.php?name=ro" I would like another content(but written in the same php file). I tried with _GET, but the problem is that I don't simply want to add a word but a lot of content. With _GET, that whole content would have to be displayed in the title and I don't want that. @requinix, In an earlier thread of mine this week, I think you - or maybe it was @Psycho - suggested putting my code which create an array of my photo files into an include file. I think the logic was that then when either my "photo-gallery.php" OR "photo-detils.php" scripts call that code, that the array will always synched because it is the same array. Ring a bell? So super newbie question, but I am rusty on includes... How does this sound...
1.) Create an "/includes/retrieve-photos.php" script?
2.) Reference that in each script, I would do this...
require_once('../../includes/retrieve-photos.php
right?
3.) To use that code, I would then just reference the populated array...
foreach($photoFiles as $photoKey => $photoValue){ }
Right?
I have build a small form that take the zip code that user enter and if is on my list will redirect to a sub domain craigslist.
I was checking all the zip codes and is pretty hard to know to what bigger city to attribute the given zip code and for that I was thinking to a simple idea to use, I am not sure how much exact will be but I think will do the trick for the moment.
The zip code range start from 00501 to 99950.
I create a array with the biggest city shown in craigslist and the zip code that correspond.
Now the tricky part, what I will do with the rest of the zip codes and my idea is to measure the distance from one to another zip code and which zip code from the array is closer from given one to take it.
<?php $zip = $_GET['zip']; $z = array ( 36830 => array ( 'auburn.craigslist.org' ), 35242 => array ( 'bham.craigslist.org' ), 36301 => array ( 'dothan.craigslist.org' ), 35630 => array ( 'shoals.craigslist.org' ), 35901 => array ( 'gadsden.craigslist.org' ) ?> Exemple: $zip= 36870 // the code received from the user 36870 - $array= ( 'auburn.craigslist.org' ), (36830 = 40) (36301 = 569) (36911 = -41) // the minus will be excluded (....etc)After checking the zip code with the ones from array, the smaller score will attribute the sub-domain correspond from the array. I hope will don t be the case when will get the same result from two zip codes:) Now I am using this rule: $zip0 = (isset($z[$zip][0]) && $z[$zip][0] != '') ? $z[$zip][0] : 'craigslist.org/about/sites#US';and I was thinking to redirect the user for a page to enter the state and the city. But I wish to make it more precises and not to involved the user so much. But if there are any other suggestions I will be glad to hear them. so im developing a WEB GAME etc.... etc.... and im including a page that has functions on it in another page if that makes sense....<br> so here's my code tell me why i cant get theese array values to clear? Code: [Select] function unlockables(){ // restore the content $unlockables = array( 'ach'=>array( // achevements unlockables md5(0)=>array('key'=>md5(0),'title'=>'novice','cash'=>'1000', 'exp'=>'100000', 'lvl'=>'20'), md5(1)=>array('key'=>md5(1),'title'=>'rookie','cash'=>'5000', 'exp'=>'150000', 'lvl'=>'40'), md5(2)=>array('key'=>md5(2),'title'=>'pro','cash'=>'10000', 'exp'=>'250000', 'lvl'=>'60'), md5(3)=>array('key'=>md5(3),'title'=>'king','cash'=>'50000', 'exp'=>'500000', 'lvl'=>'80'), md5(4)=>array('key'=>md5(4),'title'=>'Morphelo','cash'=>'100000','exp'=>'1000000','lvl'=>'100'), ), 'levels'=>array( // lvl up md5(5)=>array('key'=>md5(5),'price'=>'1000', 'lvlup'=>'1'), md5(6)=>array('key'=>md5(6),'price'=>'4000', 'lvlup'=>'5'), md5(7)=>array('key'=>md5(7),'price'=>'7500', 'lvlup'=>'10'), md5(8)=>array('key'=>md5(8),'price'=>'15000', 'lvlup'=>'25'), md5(9)=>array('key'=>md5(9),'price'=>'25000', 'lvlup'=>'50') ), 'exp'=>array( // exp up md5(10)=>array('key'=>md5(10),'price'=>'100','expup'=>'500'), md5(11)=>array('key'=>md5(11),'price'=>'1000','expup'=>'6000'), md5(12)=>array('key'=>md5(12),'price'=>'10000','expup'=>'75000'), md5(13)=>array('key'=>md5(13),'price'=>'50000','expup'=>'375000'), md5(14)=>array('key'=>md5(14),'price'=>'100000','expup'=>'750000') ) ); if($_COOKIE['lvl'] >= 0 && $_COOKIE['lvl'] < 20) { // first snakes $status = 'fs'; }elseif($_COOKIE['lvl'] >= 20 && $_COOKIE['lvl'] < 40){ // Novice $status = 'novice'; }elseif($_COOKIE['lvl'] >= 40 && $_COOKIE['lvl'] < 60){ // Rookie $status = 'rook'; }elseif($_COOKIE['lvl'] >= 60 && $_COOKIE['lvl'] < 80){ // pro $status = 'pro'; }elseif($_COOKIE['lvl'] >= 80 && $_COOKIE['lvl'] < 100){ // Novice $status = 'king'; }elseif($_COOKIE['lvl'] >= 100){ // Novice $status = 'morphelo'; } switch($status){ case 'novice': unset( $unlockables['ach'][md5(0)], $unlockables['ach'][md5(2)], $unlockables['ach'][md5(3)], $unlockables['ach'][md5(4)] ); break; case 'rook': unset( $unlockables['ach'][md5(0)], $unlockables['ach'][md5(1)], $unlockables['ach'][md5(3)], $unlockables['ach'][md5(4)] ); break; case 'pro': unset( $unlockables['ach'][md5(0)], $unlockables['ach'][md5(1)], $unlockables['ach'][md5(2)], $unlockables['ach'][md5(4)] ); break; case 'king': unset( $unlockables['ach'][md5(0)], $unlockables['ach'][md5(1)], $unlockables['ach'][md5(2)], $unlockables['ach'][md5(3)] ); break; case 'morphelo': unset($unlockables['ach']); break; } // here is were im trying print to screen but the array is still printing full print_r($unlockables['ach']); } As you can see, this array is setting each colorvalue to each idvalue. Code: [Select] <?php include("config.php"); include("db.php"); $arrid=$_POST['id']; $arrcolor=$_POST['color']; foreach ($arrid as $idvalue) { foreach ($arrcolor as $colorvalue) { $sql = "UPDATE colors SET color='$colorvalue' WHERE id = '$idvalue'"; mysql_query($sql) or die("Error: ".mysql_error()); echo $sql; } } header("Location: " . $config_basedir . "adminhome.php"); ?> Hello together, I'm still relatively new with PHP and I'm encountering an error with the error code (Warning: Undefined array key "title" in I:\xampp\htdocs\test\Datenspeichern.php on line 13 to 17.). Normally I wanted that when I enter the data in the fields from the CD_Website page, that it is inserted in my created database and displayed in the table on the page. Does anyone know where my error is? Thanks a lot
main Code= <!doctype html> <html> <head> <meta charset="utf-8"> <title>Unbenanntes Dokument</title> <style type="text/css"> table { border-collaps: collapse; width: 100%; font-family: serif; font-size: 35px; text-align: center; } td { font-size: 25px; text-align: center; font-family: serif; } </style> </head> <body> <table> <tr> <th>CD-Titel</th> <th>Artist</th> <th>Songtitel</th> <th>Musiklänge</th> <th>Lied Nummer</th> </tr> <?php $host = "localhost"; $user = "root"; $password = ""; $db_name = "cdaufgabe"; $con = mysqli_connect($host, $user, $password, $db_name); if(mysqli_connect_error()) { die("Verbindungsabbruch mit der Datenbank: ". mysqli_connect_error()); }; $check = "SELECT * FROM `cd-titel`"; $result = mysqli_query($con, $check); if ($result > null) { while ($row = $result->fetch_assoc()){ echo "<tr><td>" . $row['CD-Titel'] . "</td> <td>" . $row['Artist'] . "</td> <td>" . $row['Songtitel'] . "</td> <td>" . $row['Musiklänge'] . "</td> <td>" . $row['Lied-Nummer'] . "</td></tr>"; }; }; /*if (isset($_POST['submitted'])) { $titel = $_POST['titel']; $artist = $_POST['artist']; $songtitel = $_POST['songtitel']; $musicle = $_POST['musicle']; $liednr = $_POST['liednr']; $data_add = "INSERT INTO cd-titel (CD-Titel, Artist, Songtitel, Musiklänge, Lied-Nummer) VALUES ('$titel', '$artist', '$songtitel', '$musicle', '$liednr')"; if (!mysqli_query($db_name, $data_add)) { die('Fehler beim einfügen von Daten'); } } */ // $data_add = "INSERT INTO `cd-titel` (`CD-Titel`, `Artist`, `Songtitel`, `Musiklänge`, `Lied-Nummer`) VALUES ('$titel', '$artist', '$songtitel', '$musicle', '$liednr')"; // mysqli_query($con, $data_add); /*mysqli_query($con, $data_add);*/ ?> <form methode="post" action="Datenspeichern.php"> <input type="text" name="titel" placeholder="CD-Titel"/> <input type="text" name="artist" placeholder="Artist"/> <input type="text" name="songtitel" placeholder="Songtitel"/> <input type="text" name="musicle" placeholder="Musiklänge"/> <input type="text" name="liednr" placeholder="Lied-Nummer"/> <input type="submit" name="submitted" value="speichern"/> </form> </br></br></br> </table> </body> </html> second code(Datenspeichern.php)= <?php $con = mysqli_connect('localhost', 'root', ''); if (!$con) { echo'Nicht verfügbar'; } if (!mysqli_select_db($con, 'cdaufgabe')){ echo 'Datenbank nicht ausgewählt'; }; $titel = $_POST['titel']; $artist = $_POST['artist']; $songtitel = $_POST['songtitel']; $musicle = $_POST['musicle']; $liednr = $_POST['liednr']; $data_add = "INSERT INTO cd-titel (CD-Titel, Artist, Songtitel, Musiklänge, Lied-Nummer) VALUES ('$titel', '$artist', '$songtitel', '$musicle', '$liednr')"; if (!mysqli_query($con, $data_add)){ echo 'Fehler'; } else { echo'Eingefügt'; }; header("url=CD_Webseite.php"); ?> Does anyone knows the mistake i keep doing? this is an array returned after parsing YAMl file using spyc api. i want to write a code to to extract value related to key topic name and put in a separate 1d array say $topicnames Array ( [1] => Array ( [topicname] => singapore travels [rev] => 250 => Array ( [25] => Array ( ) [topicname] => airlines [rev] => 24 ) [1] => Array ( [35] => Array ( ) [topicname] => shubham [rev] => 65 ) ) [2] => Array ( [topicname] => singapore entertainment [rev] => 210 => Array ( [45] => Array ( ) [topicname] => night safari[rev] => 54 ) i tried using simple for loop but not working.. pl help me out. I have a problem with the below code: Code: [Select] <?php $sql_ranks = ("SELECT vtp_members.id, vtp_members.name, vtp_members.teamleader, teams.team_name, count(vtp_tracking.id) surfs FROM vtp_members, vtp_tracking, teams WHERE vtp_members.team_id=".$_GET['t']." AND vtp_tracking.credit_members_id=vtp_members.id AND vtp_tracking.action_date > '$last_sunday' AND vtp_tracking.action_date < '$next_sunday' GROUP BY teams.team_name ORDER BY surfs DESC"); $rsranks = mysql_query($sql_ranks); echo "<br><table align='center' valign='top' border='0' width='300px'> <tr><td colspan='2' align='center'><font size='2px'><b>Team Rankings (Current Week)</b></font></td></tr> <tr><td><font size='2px'><b>Team</font></td><td align='right'><font size='2px'>Total Surfs</font></td></tr>"; while ($row = mysql_fetch_array($rsranks)) { echo "<tr><td><font size='2px'><b>".$row[team_name]."</font></td><td align='right'><font size='2px'>".$row[surfs]."</font></td></tr>";} echo "</table>"; ?> Problem is that the last output (".$row[surfs].") is the same for all teams. It seems it is not making a total of all id's and not per team_name. anyone can see what I am doing wrong. I need to sort by team_name and the surfs should display the total of the members with team_id is ".$_GET['t']." I've tried mysql_error(), yet nothing is displayed, but I'm pretty sure it may be something wrong with my query. After someone inputs their new information, site title in the database is changed to 0, and description isn't updated at all.., but it's still the same data as before and isn't changed. if(!$_POST['title'] || !$_POST['description']) { echo " <table><form action='account.php' method='POST'> <input type='hidden' name='edit' value='1'> <tr><td>Site Name</td><td><input type='text' name='title' value='". $grab['title'] ."'></td></tr> <tr><td>Site Description</td><td><textarea name='description' rows='18' cols='40' maxlength='550'>". $grab['description'] ."</textarea></td></tr> <tr><td>Finished?</td><td><input type='submit' value='Update Information'></td></tr> </form></table>"; } else { $title = mysql_real_escape_string(strip_tags($_POST['title'])); $description = mysql_real_escape_string($_POST['description']); $to_censor = array("fag", "ass", "asshole", "douchebag", "dumbass"); $new = str_replace($to_censor, "****", $description); $description = strip_tags($new, "<b><i><a>"); mysql_query("UPDATE sites SET title = '$title' AND description = '$description' WHERE username = '". $_SESSION['user'] ."'") or die(mysql_error()); echo "Updated information successfully. <a href='account.php'>Back to My Account</a>"; } Code: [Select] Echo "<img src='http://datenight.netne.net/images/".$info['img'] ."'title='.info['username']'"."' width='50' height='50'>"; im trying display the user's, username in the title when the mouse hovers over the img it displays the username of that image. no errors just displays .info as title thanks [/code] Hello, I am assigned a task to make alterations on a client website. The header is an include on all pages. Inside the header is the title tag which propogate to all pages. I want title different to each page, I will also add description and keyword. Is there a way to do this with PHP or should I have different header for each page. thank you Hi guys, this is my problem. I use wordpress and i have diffrent titles for every post. The php code for the title is <?php the_title(); ?> I want to add my title after this url: http://search.msn.com/results.aspx?format=rss&FORM=RSRE&q= That means if i have a post with this title: php tutorials The url should be like this: http://search.msn.com/results.aspx?format=rss&FORM=RSRE&q=php+tutorials This is the part of my php code that contains the url: <?php $url="http://search.msn.com/results.aspx?format=rss&FORM=RSRE&q=php+tutorials"; $rss=new rssFeed($url); I tried this already but it is not working: <?php $url="http://search.msn.com/results.aspx?format=rss&FORM=RSRE&q=<?php the_title(); ?>"; $rss=new rssFeed($url); Sorry, i hope you understand what i mean. I know this topic is everywhere but I cant find a solution to my particular problem. I have been using a download center script for about a year. http://download.redgalaxy.net/ However, the title is static, keeping with the predefined one. I am trying to get the title to change so it matches the file name shown on the display page "index.php/?nav=display&file=25". I have spent days trying to figure something out with absolutely no luck. Does anyone have an idea how to get the title to change when dynamically? Out of desperation i used an onload javascript but it doesnt work with crawlers. Thank you in advanced. Index.php <?php /* PHP Download Center Copyright (C) 2007 Chris LaPointe This program is free softwa you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ //error_reporting(E_ERROR); define("PHP_DOWNLOADCENTER", 1); include_once('settings.php'); //Include all files in 'inc' directory $path = 'inc/'; $handle = opendir($path); while (false !== ($file = readdir($handle))) { if (substr($file, 0, 1) != '.') include($path.$file); } closedir($handle); //Start session for me! session_start(); if (mysql_connect($mysql_host, $mysql_username, $mysql_password) == FALSE){ if (file_exists("install.php")){ echo '<HTML><HEAD><meta http-equiv="refresh" content="0;url=install.php"></HEAD></HTML>'; exit; }else{ die("Fatal error. Unable to access database. In addition, unable to go to install.php to setup access!"); } } if (mysql_select_db($mysql_database) == FALSE){ if (file_exists("install.php")){ echo '<HTML><HEAD><meta http-equiv="refresh" content="0;url=install.php"></HEAD></HTML>'; exit; }else{ die("Fatal error. Unable to access database. In addition, unable to go to install.php to setup access!"); } } //because of the way it is handled, there should never be any HTML passed via arguments //do a check here foreach ($_GET as $key => $value){ $_GET[$key] = strip_tags(html_entity_decode($value, ENT_NOQUOTES), '<i><b>'); } //Run the now (Just code, ie login code) if ( isset($_GET['now']) ){ $nowfile = "pages/".$_GET['now'].'.now.php'; if (file_exists($nowfile)){ include($nowfile); }else{ echo "<b>Warning:</b> Now file '$nowfile' doesn't exist"; } } ?> <HTML> <HEAD> <TITLE><?php echo $page_title; ?></TITLE> <link rel="stylesheet" type="text/css" href="style.css"> </HEAD> <BODY> <!--TOP SECTION (banner)--> <table width=100% border=0 cellspacing=2 cellpadding=0> <TR> <TD valign="top"><img src="theme/page/banner.gif"></TD> <TD valign="middle"><div align="right"><?php include('ads/ad_top.php'); ?></div></TD> </TR> </TABLE> <!--MIDDLE SECTION--> <table width=100% border=0 cellspacing=2 cellpadding=0> <TR> <TD width=150px valign="top"><?php require('left.php'); ?></TD> <TD valign="top"> <table width=100% border=0 cellspacing=2 cellpadding=0> <TR><TD><?php include('nav.php'); ?></TD></TR> <TR><TD><?php include('body.php'); ?></TD></TR> </table> </TD> </TR> </table> <BR> <div align="center"><font size="1"> This page is under the <a href="http://gplv3.fsf.org/">GPLv3</a> by <a href="http://www.redgalaxy.net" target="_blank">Red Galaxy</a>. Each file is copyrighted by its respective owner.<BR> This page is not to be held responsible for any uploaded files. It is each user's responsibility to check the legality of files they upload.<BR> Please contact <i><?php echo $info_name; ?></i> at <?php echo str_replace('@', "'AT'", str_replace('.', "'DOT'", $info_email)); ?> with any questions.<BR> <?php echo $info_misc; ?></font> </div> </BODY> </HTML> <?php mysql_close(); ?> nav.php <?php if (!defined('PHP_DOWNLOADCENTER')) exit; ?> <table width=100% border=0 cellspacing=0 cellpadding=0> <TR> <TD> <a href="?nav=home">Home</a> | <a href="?nav=recent">Recent Files</a> </TD> <TD align="right"> <form action="?nav=search_results" method="post"><INPUT type="text" size="20" name="search"><INPUT type="submit" value="Search"></form> </TD> </table> body.php <?php if (!defined('PHP_DOWNLOADCENTER')) exit; if (!isset($_GET['nav'])){ $location = 'pages/home.php'; }else{ $location = 'pages/'.$_GET['nav'].'.php'; } if (isset($_GET['message'])){ echo '<div align="center">'; echo BeginBorder("Message", "50%"); echo stripslashes(urldecode($_GET['message'])); echo EndBorder(); echo '</div>'; } if (file_exists($location)) include($location); else include("pages/404.php"); ?> display.php <?php $fid = $_GET['file']; $results = mysql_query("SELECT * FROM files WHERE id=$fid LIMIT 1"); if (mysql_numrows($results) == 0){ echo "File not found. It may have been removed."; return; } $who = getUserNameById(mysql_result($results,0,"uid")); echo BeginBorder(mysql_result($results, 0, "title"), "90%"); ?> <TABLE width=100% border=0 cellspacing=0 cellpadding=0> <TR><TD width=50% valign="top"> <TABLE width=100% border=0 cellspacing=1 cellpadding=2> <TR bgcolor=#F0F0F0> <TD width=50%>Name:</TD> <TD><?php echo mysql_result($results, 0, "title"); ?></TD> </TR> <TR bgcolor=#F0F0F0> <TD>File:</TD> <TD><?php echo mysql_result($results, 0, "filename"); ?></TD> </TR> <TR bgcolor=#F0F0F0> <TD>Size:</TD> <TD><?php echo round( mysql_result($results, 0, "filesize")/1024/1024,2).'MB'; ?></TD> </TR> <TR bgcolor=#F0F0F0> <TD>Extension:</TD> <TD><?php echo mysql_result($results, 0, "filetype"); ?></TD> </TR> <TR bgcolor=#F0F0F0> <TD>Category:</TD> <TD><?php echo mysql_result($results, 0, "category"); ?></TD> </TR> <TR bgcolor=#F0F0F0> <TD>User:</TD> <TD><?php echo $who; ?></TD> </TR> <TR bgcolor=#F0F0F0> <TD>Date Uploaded:</TD> <TD><?php echo mysql_result($results, 0, "date"); ?></TD> </TR> <TR bgcolor=#F0F0F0> <TD>Download Count:</TD> <TD><?php echo mysql_result($results, 0, "dcount"); ?></TD> </TR> <TR bgcolor=#F0F0F0> <TD>Downloads This Month</TD> <TD><?php echo mysql_result($results, 0, "dmonth"); ?></TD> </TR> </TABLE> </TD> <TD valign="top"> <center> <a href="<?php echo '?nav=download&file='.$fid; ?>"><img src="theme/download.png" border=0></a> <?php if (mysql_result($results, 0, 'private') == '1') echo "<br>You must be logged in to download this file.</b>"; ?> </center><BR><BR> <?php //PREVIEW IMAGE IF EXISTS $realname = mysql_result($results, 0, "filename"); $small_preview = 'images/'.$realname.'.small.jpg'; $large_preview = 'images/'.$realname.'.large.jpg'; if (file_exists($small_preview)){ echo "<div align='center'><a href='$large_preview' target='_blank'><img src='$small_preview' border='0'></a></div><BR>"; } //ADMIN CONTROLS if (isUserAdmin()){ echo '<b>Admin:</b> <a href="?nav=delete&file='.$fid.'">Delete This File</a> | <a href="?nav=edit&file='.$fid.'">Edit</a><BR>'; } ?> </TD></TR> </TABLE> <HR> <b>Description:</b><BR> <?php echo mysql_result($results, 0, "description"); ?> <?php echo EndBorder(); ?> Trying to figure this out... Code: [Select] <?php echo get_the_title(); ?> works to display my wordpress post title on the page. how can I echo that inside this code? Code: [Select] <?php if (function_exists('simple_feed_list')) : ?> <?php simple_feed_list('I WANT TO ECHO TITLE HERE'); ?> <?php endif; ?> On one of my pages I set the title like this Code: [Select] <{assign var="title" value=$people->getShow()|escape}> The problem is I want the title to say getShow and getName Tried to do it like this but I get an internal 500 error Code: [Select] <{assign var="title" value=$people->getShow()|escape}$people->getName()|escape}> How can I make this work? Thanks in advance I've got this code Code: [Select] <{assign var="title" value=$people->getTitle()|cat:" "|cat:$people->getName()|cat:" | Sea.com"}> How do I write some text fx. 'visit' in the beginning of the title value? Tried to do it like this Code: [Select] <{assign var="title" value=Visit $people->getTitle()|cat:" "|cat:$people->getName()|cat:" | Sea.com"}>But then I get an error. Any help mych appriciated |