PHP - Images Not Showing
Hi,
I am using the include function to link my header and menu up to my files. My folder structure is: WWW Folder -head.html -menu.html -homepage.php Images Folder Blog Folder -index.php The head.html and menu.html have links to images kept within the images folder. homepage.php and index.php both have include functions to include the menu and header thus including the images. homepage.php works fine the images show up however blog.php links to the head and menu but does not show up the images. my include function for index.php is: <?php include ("..\menu.html"); ?> I have attached a print screen of what the index.php looks like, its obvious that its picking up the head and menu as its showing the image names but not showing the images. Can anybody help it's really confusing me? Thanks Similar TutorialsI made an upload image system, the images are stored in a folder, while the image name is stored in database. When I try to execute the image name, it works successfully, but when I try to disply the image from the folder by using the image name in the database, I fail each time. The folder where the images are being stored is named: saveimage Here is the query: Code: [Select] <?php mysql_connect('localhost', 'root', '') or die ('Connection Failed'); mysql_select_db('imagedatabase'); $images = mysql_query("SELECT * FROM img WHERE email='$lemail'"); while($row = mysql_fetch_array($images)) { echo "<img src='saveimage/'".$row['img_description']; } ?> I have a string for rating, containing numbers from 0-5. How I can assign an image to each range: 0-0.5 displaying 05.jpg 0.5-1.0 displaying 10.jpg . . . 4.5-5.0 displaying 50.jpg If it would be just CSS I would just put " " around the url, however this is a php script. Here's the line:
<li style="background: url({img server_id=$aSlidePhoto.server_id path='photo.url_photo' file=$aSlidePhoto.destination suffix='_175' title=$aSlidePhoto.title return_url=true}); width: 175px; height: 130px;">It works for all images except, for example: myimage (1).jpg What's the fix for such case? This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=317486.0 I am pretty new to PHP and am trying to create a simple (so I assumed) page to takes data from one html page(works fine) and updates a MYSQL Database. I am getting no error message, but the connect string down to the end of the body section is showing up as plain text in my browser window. I do not know how to correct this. I have tried using two different types of connect strings and have verified my names from the HTML page are the same as listed within the php page. Suggestions on what I need to look for to correct would be great. I have looked online, but so far all I am getting is how to connect, or how to create a comment, so I thought I would try here. Thank you for any assistance I may get!! - Amy - Code: [Select] <body><font color="006600"> <div style="background-color:#f9f9dd;"> <fieldset> <h1>Asset Entry Results</h1> <?php // create short variable names $tag=$_POST['tag']; $serial=$_POST['serial']; $category=$_POST['category']; $status=$_POST['status']; $branch=$_POST['branch']; $comments=$_POST['comments']; if (!$tag || !$serial || !$category || !$status || !$branch) { echo "You have not entered all the required details.<br />" ."Please go back and try again."; exit; } if (!get_magic_quotes_gpc()) { $tag = addslashes($tag); $serial = addslashes($serial); $category = addslashes($category); $status = addslashes($status); $branch = addslashes($branch); $comments = addslashes($comments); } //@ $db = new mysqli('localhost', 'id', 'pw', 'inventory'); $db = DBI->connect("dbi:mysql:inventory:localhost","id","pw") or die("couldnt connect to database"); $query = "insert into assets values ('".$serial."', '".$tag."', '".$branch."', '".$status."', '".$category."', '".$comments."')"; $result = $db->query($query); if ($result) { echo $db->affected_rows." asset inserted into Inventory."; } else { echo "An error has occurred. The item was not added."; } $db->close(); ?> </fieldset> </div> </body> I have this script from http://lampload.com/...,view.download/ (I am not using a database) I can upload images fine, I can view files, but I want to delete them. When I press the delete button, nothing happens
http://www.jayg.co.u...oad_gallery.php
<form>
<?php $dir = dirname(__FILENAME__)."/images/gallery" ; $files1 = scandir($dir); foreach($files1 as $file){ if(strlen($file) >=3){ $foil = strstr($file, 'jpg'); // As of PHP 5.3.0 $foil = $file; $pos = strpos($file, 'css'); if ($foil==true){ echo '<input type="checkbox" name="filenames[]" value="'.$foil.'" />'; echo "<img width='130' height='38' src='images/gallery/$file' /><br/>"; // for live host //echo "<img width='130' height='38' src='/ABOOK/SORTING/gallery-dynamic/images/gallery/ $file' /><br/>"; } } }?> <input type="submit" name="mysubmit2" value="Delete"> </form>
any ideas please?
thanks
I decided to redo the individual roster page I have on my site and came up with this. <?php if(isset($_GET['username']) && $_GET['username'] != '') { $username = $_GET['username']; $query = "SELECT bio.username AS username, bio.charactername AS charactername, bio.id AS id, bio.style_id AS style FROM `efed_bio` AS bio ON bio.id = ebw.bio_id WHERE bio.username = '$username'"; if(!$result = mysql_query($query)) while ($row = mysql_fetch_assoc($result)) { $fieldarray=array('id','username','charactername','style'); foreach ($fieldarray as $fieldlabel) { if (isset($row[$fieldlabel])) { $$fieldlabel=$row[$fieldlabel]; $$fieldlabel=cleanquerydata($$fieldlabel); } } } } ?> <h1><?php echo $charactername; ?>'s Biography</h1> <?php echo getBioMenu($style,$username); ?> <? //If the GET page variable is biography, display the biography page if ($page == 'biography') { echo getBiopgrahy($style,$id); } //Or if the GET page variable is gallery, display the gallery page elseif ($page == 'gallery') { echo getGallery($style,$id); } //If the GET page variable is news, display the news page elseif ($page == 'news') { echo getNews($$id); } //If the GET page variable is segments, display the segments page elseif ($page == 'segments') { echo getBioSegments($id,S); } //If the GET page variable is matches, display the matches page elseif ($page == 'matches') { echo getBioSegments($id,M); } elseif ($page == 'chronology') { echo getChronology($id); } //Otherwise display the bio else { echo getBio($style,$id); } ?> The list of characters are listed he http://kansasoutlawwrestling.com/roster An example of someone's individual roster page is located he http://kansasoutlawwrestling.com/bio?username=oriel i have the following code: <?php session_start(); include "connect.php"; $queryFinished = mysql_query("SELECT * FROM `finished` ORDER BY auctionID DESC LIMIT 10;") or die(mysql_error()); $queryAdmin = mysql_query("SELECT maxClosed FROM `admin`;") or die(mysql_error()); //echo $queryAuctionID." = Auction ID<br />"; $username = mysql_fetch_assoc($queryFinished); $queryShip = mysql_query("SELECT * FROM ships WHERE typeName='$username[itemName]';") or die(mysql_error()); $getShip = mysql_fetch_assoc($queryShip); $shipID = $getShip[typeID]; echo "<img src='http://image.eveonline.com/Character/".$username[charid]."_32.jpg'> <span class='eveyellow'>".$username[username]."</span> has won a <img src='/images/types/shiptypes_png/32_32/".$shipID.".png'/> ".$username[itemName]." with ticket number #".$username[ticketNumber]."<br />"; ?> it basically lists the most recent auctions that have won, but even though i set the query to LIMIT by 10 it still only shows the 1? is something above sticking out to anyone? i know it looks messy but im still learning. The following code should output 1743425391, but it does not show anything <?php $xml_feed_url = 'http://api.eve-online.com/eve/CharacterID.xml.aspx?names=TX1'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $xml_feed_url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $xml = curl_exec($ch); curl_close($ch); $xmlr = new SimpleXMLElement($xml); $charid = $xmlr->result->characterID; echo $charid; ?> The xml is: Code: [Select] <eveapi version="2"> <currentTime>2011-02-01 05:22:38</currentTime> − <result> − <rowset name="characters" key="characterID" columns="name,characterID"> <row name="TX1" characterID="1743425391"/> </rowset> </result> <cachedUntil>2011-03-01 05:22:38</cachedUntil> </eveapi> Any ideas where I went wrong? Hi, I just connect to my server through ftp. i want to edit php.ini file. which is placed in /etc/php.ini "etc" folder. but i'm unable to see etc folder. there are only two folders one is cgi-bin and other is www. can anyone help me to find out etc folder. i've check to show hidden files in filezilla. Thanks Hello all, I am trying to get a simple members.php page to show some HTML but I cannot figure out why it will not display.. Code: [Select] <?php mysql_connect("myserver", "myname", "mypass") or die(mysql_error()); mysql_select_db("mydb") or die(mysql_error()); if(isset($_COOKIE['ID_my_site'])) { $username = $_COOKIE['ID_my_site']; $pass = $_COOKIE['Key_my_site']; $check = mysql_query("SELECT * FROM Users WHERE name = '$name'")or die(mysql_error()); while($info = mysql_fetch_array( $check )) { if ($password != $info['password']) { header("Location: login.php"); } else { ?> <html> <body> <h1>WHY</h1> </body> </html> <?php } } } else { header("Location: login.php"); } ?> I was googling and read somewhere that it might be a session bug after the initial '<?php tag'? Any help would be greatly appreciated Tokae Hello: I have this bit of code in the works (which does not work): Code: [Select] <?php if ( $mySubHeader; != "" ) { echo " <h2> <?php echo $mySubHeader; ?> </h2> "; } What I am trying to do is to show the H2 tag only if it has a value from the database. Otherwise, I do not want to show it. What is the correct way to do this? Thanks. I have a really strange query for you all to figure out why I'm not coming up with the right SELECT statement. I've echoed it and I'll show you what I get for a result from the echo as well. Table- Users Fields- id,creator_id,username,password,firstname,lastname,email,status_id,isadmin,datecreated $query = "SELECT CONCAT_WS(' ', firstname, lastname) AS name, CONCAT_WS(' ', firstname, lastname) AS handler, DATE_FORMAT(datecreated, '%M %d, %Y') AS datecreated, id, username, email FROM handlers WHERE handlers.id = handlers.creator_id"; produced this result... SELECT CONCAT_WS(' ', firstname, lastname) AS name, CONCAT_WS(' ', firstname, lastname) AS handler, DATE_FORMAT(datecreated, '%M %d, %Y') AS datecreated, id, username, email FROM handlers WHERE handlers.id = handlers.creator_id php data table code: <?php $query = "SELECT CONCAT_WS(' ', firstname, lastname) AS name, CONCAT_WS(' ', firstname, lastname) AS handler, DATE_FORMAT(datecreated, '%M %d, %Y') AS datecreated, id, username, email FROM handlers WHERE handlers.id = handlers.creator_id"; $result = mysqli_query ( $dbc, $query ); // Run The Query $rows = mysqli_num_rows($result); echo $query; <?php if ($rows > 0) { ?> <table cellspacing="0" class="listTable" id="handlersPageList"> <!-- Thead --> <thead> <tr> <th class="first"><div></div></th> <th><a href="#" title="Handler Name">Handler Name</a></th> <th><a href="#" title="Handler Username">Handler Username</a></th> <th><a href="#" title="Handler Emal">Handler Email</a></th> <th><a href="#" title="Creator">Creator</a></th> <th class="last"><a href="#" title="Date Created">Date Created</a></th> </tr> </thead> while ( $row = mysqli_fetch_array ( $result, MYSQL_ASSOC ) ) { echo ' <tr> <td><input type=checkbox class=checkbox value="' . $row['id'] . '" /></td> <td>' . $row['handler'] . '</td> <td>' . $row['username'] . '</td> <td><a href="mailto:' . $row['email'] . '>' . $row['email'] . '</a></td> <td>' . $row['name'] . '</td> <td class=last>' . $row['datecreated'] . '</td> </tr>'; } ?> I just decided to take out the parts of the page that would be needed to answer this problem instead of the whole file. This is a little confusing okay lets say the first user is the Administrator with an id of 1 obviously has a first name and last name and username and email and the date he registered is his datecreated and his creator_id is going to be preset because he created it himself so its going to be 1. The 1st row in the database displays fine however I have 4 other rows that for some reason aren't displaying. And don't know why. For handlers 2-4 they all have their own first and last names and usernames and everything else however when it comes to the creator_id those 3 have a creator_id of 1 representing that the Administrator created it so in the data table instead of it showing the value of 1 for the creator_id I just want it to get the CONCCAT version of the first and last name of the Administrator. In the past I have not done a very good job of explaining things so I hope this is more than clarified my intention with my code and what it should do and what it is doing wrong right now. If you have any other questions please ask. Hi People. Here is a form that is supposed to read from my database. My primary key is called "index" and I have about 300 records in the database. I wanted to be able to view the records but when I load this page the "php" part is empty. I simply get given a blank form. I know it is connecting to the DB OK because I changed one letter in the password and then got a "can't connect to the database error" just to test it out. Code: [Select] <?php $host = 'localhost'; $usr = "the_db_user"; $password = 'not_shared_on_forum'; $db_name = 'stranded'; function cr($string){ $clean_string = str_replace("rn","<BR>",$string); return $clean_string; } //$id = 11; if (!isset($id)) $id = $_GET['id']; mysql_connect ("$host","$usr","$password") or die ('Error During Connect:<br>'.mysql_error()); mysql_select_db ("$db_name") or die ('Error Selecting DB:<br>'.mysql_error()); $read_query = "select * from HelperFormData where index = '$id'"; $results = mysql_query($read_query); $rs = mysql_fetch_array($results); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> <style type="text/css"> <!-- body,td,th { font-size: 12px; } --> </style></head> <body> Surname: <? echo $rs["surname"]; ?> <table width="500" border="1" bordercolor = "#2c2cf6" textcolor = "#2c2cf6"cellspacing="1" cellpadding="2"> <tr> <td colspan="5">Record number: <? echo $rs["index"]; ?></td> </tr> <tr> <td width="120" bgcolor = #E6F8EB>Surname</td> <td width="120" bgcolor = #E6F8EB>First Name</td> <td width="120" bgcolor = #E6F8EB>phone1</td> <td width="120" bgcolor = #E6F8EB>phone2</td> <td width="120" bgcolor = #E6F8EB>Location</td> </tr> <tr> <td bgcolor = #E6F8EB textcolor = #AC1636><strong><? echo $rs["surname"]; ?></strong></td> <td bgcolor = #E6F8EB><strong><? echo $rs["firstname"]; ?></strong></td> <td bgcolor = #E6F8EB><strong><? echo $rs["phone1"]; ?></strong></td> <td bgcolor = #E6F8EB><strong><? echo $rs["phone2"]; ?></strong></td> <td bgcolor = #E6F8EB><strong><? echo $rs["location"]; ?></strong></td> </tr> <tr> <td bgcolor = #dbeff8>Qualifications</td> <td bgcolor = #dbeff8>Expertise</td> <td bgcolor = #dbeff8>Assistance</td> <td bgcolor = #dbeff8>Languages</td> <td bgcolor = #dbeff8>E-Mail</td> </tr> <tr> <td bgcolor = #dbeff8><strong><? echo $rs["qualifications"]; ?></strong></td> <td bgcolor = #dbeff8><strong><? echo $rs["expertise"]; ?></strong></td> <td bgcolor = #dbeff8><strong><? echo $rs["assistance"]; ?></strong></td> <td bgcolor = #dbeff8><strong><? echo $rs["languages"]; ?></strong></td> <td bgcolor = #dbeff8><strong><? echo $rs["e_mail"]; ?></strong></td> </tr> <tr> <td bgcolor = #E6F8EB>Consent</td> <td bgcolor = #E6F8EB>Published</td> <td bgcolor = #E6F8EB> </td> <td bgcolor = #E6F8EB> </td> <td bgcolor = #E6F8EB> </td> </tr> <tr> <td bgcolor = #E6F8EB><strong><? echo $rs["consent"]; ?></strong></td> <td bgcolor = #E6F8EB><strong><? echo $rs["radio_callsign"]; ?></strong></td> <td bgcolor = #E6F8EB> </td> <td bgcolor = #E6F8EB> </td> <td bgcolor = #E6F8EB> </td> </tr> <tr> <td colspan="5"><p>Comments:<br /> <strong><? echo $rs["comments"]; ?></strong></td> </tr> </table> </body> </html> </html> I am wanting to echo one of these 4 statements depending on the 'status' value. Currently it is showing the status value on the 2nd line but not the statement below.. Code: [Select] <li> <strong>Status: </strong><?php more_fields('status') ?> <?php if (more_fields('status')=="Red") echo "Your account is currently undergoing judgement"; elseif (more_fields('status')=="Green") echo "Your account is currently Live"; elseif (more_fields('status')=="Yellow") echo "Your account is currently undergoing site visits"; elseif (more_fields('status')=="Blue") echo "Your account is currently undergoing insolvency/liquidation";?> </li> any help appreciated. Thanks, Jake hi all I have a table which i have got results from a database. My question If i want to display the details of a particular row. How do I do that? Thanks Rgds Hey all, Been coding another script for my website which allows me to update a users Rank, allthough, when I try and view the page its giving me a White Blank Page. I carn't accually see whats wrong in my Script... <?php session_start(); include ("../includes/config.php"); include ("../includes/function.php"); logincheck(); ini_set ('display_errors', 1); error_reporting (E_ALL); $username = $_SESSION['username']; // Owner Script - Change Users Rank $userlevel = mysql_query ("SELECT * FROM users WHERE username = '$username' LIMIT 1") or die ("Error Finding Right Users " . mysql_error()); $levelright = mysql_fetch_object($userlevel); // If userlevel isn't 5, move them on... if ($levelright->userlevel == "1" || $levelright->userlevel == "2" || $levelright->userlevel == "3" || $levelright->userlevel == "4"){ header ("Location: 404.php"); die(); } // Start Change Rank... if (strip_tags($_POST['changerank'])){ $name = $_POST['name']; $userchange = $_POST['userchange']; $real = mysql_query ("SELECT * FROM users WHERE username = '$userchange' LIMIT 1"); $number = mysql_num_rows($real); if ($number != "1"){ echo ("$userchange, is NOT registered! - Simple Words : No Such User!"); } if ($name == 1){ $reprand = rand(100, 50000); mysql_query ("UPDATE users SET rank = 'Learner Driver (1)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 1 if ($name == 2){ $reprand = rand(50000, 200000); mysql_query ("UPDATE users SET rank = 'Passed Driver (2)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 2 if ($name == 3){ $reprand = rand(200000, 500000); mysql_query ("UPDATE users SET rank = 'New Driver (3)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 3 if ($name == 4){ $reprand = rand(500000, 2500000); mysql_query ("UPDATE users SET rank = 'Speeding Driver (4)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 4 if ($name == 5){ $reprand = rand(2500000, 7000000); mysql_query ("UPDATE users SET rank = 'Skilled Driver (5)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 5 if ($name == 6){ $reprand = rand(7000000, 20000000); mysql_query ("UPDATE users SET rank = 'Maniac Driver (6)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 6 if ($name == 7){ $reprand = rand(20000000, 45000000); mysql_query ("UPDATE users SET rank = 'Wanted Racer (7)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 7 if ($name == 8){ $reprand = rand(45000000, 90000000); mysql_query ("UPDATE users SET rank = 'Pro Driver (8)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 8 if ($name == 9){ $reprand = rand(90000000, 115000000); mysql_query ("UPDATE users SET rank = 'Supreme Racer (9)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 9 if ($name == 10){ $reprand = rand(115000000, 150000000); mysql_query ("UPDATE users SET rank = 'Super Supreme Racer (10)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 10 if ($name == 11){ $reprand = rand(150000000, 210000000); mysql_query ("UPDATE users SET rank = 'Show Off Driver (11)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 11 if ($name == 12){ $reprand = rand(210000000, 280000000); mysql_query ("UPDATE users SET rank = 'Extreme Show Off Driver (12)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 12 if ($name == 13){ $reprand = rand(280000000, 350000000); mysql_query ("UPDATE users SET rank = 'Trained Driver (13)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 13 if ($name == 14){ $reprand = rand(350000000, 430000000); mysql_query ("UPDATE users SET rank = 'Super Trained Driver (14)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 13 if ($name == 15){ $reprand = rand(430000000, 520000000); mysql_query ("UPDATE users SET rank = 'Legendry Racer (15)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 15 if ($name == 16){ $reprand = rand(520000000, 600000000); mysql_query ("UPDATE users SET rank = 'Most Legendry Racer (16)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 16 if ($name == 17){ $reprand = rand(600000000, 1000000000); mysql_query ("UPDATE users SET rank = 'Official SD Legend (17)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 17 if ($name == 18){ $reprand = rand(1000000000, 1000000010); mysql_query ("UPDATE users SET rank = 'Hidden Rank! (18)' AND rep = '$reprand' WHERE username = '$userchange'") or die ("Error Updating rank " . mysql_error()); } // Name 18 echo ("Successfully updated $userchange Rank!"); mysql_query("INSERT INTO `inbox` ( `id` , `to` , `from` , `message` , `date` , `read` , `saved` , `event_id` ) VALUES ( '', '$userchange', 'System', 'Your Rank has now been changed!', '$date', '0', '0', '0')") or die ("Error updating there inbox!" . mysql_error()); } // Rank Change if (strip_tags($_POST['selectname'])){ $writenname = $_POST['nameinput']; $rankinput = $_POST['rankinput']; $repinput = $_POST['repinput']; $findme = mysql_query ("SELECT * FROM users WHERE username = '$writenname' LIMIT 1") or die ("Error Searching Names " . mysql_error()); $found = mysql_num_rows($findme); if ($found != "1"){ echo ("$writenname, isn't Registered! - Simple Terms : No Such User"); }else{ mysql_query ("UPDATE users SET rank = '$rankinput' AND rep = '$repinput' WHERE username= '$writenname'") or die ("Error Updating Rank + Rep " . mysql_error()); echo ("$writenname Rank has now been changed!"); mysql_query("INSERT INTO `inbox` ( `id` , `to` , `from` , `message` , `date` , `read` , `saved` , `event_id` ) VALUES ( '', '$writenname', 'System', 'Your Rank has now been changed!', '$date', '0', '0', '0')") or die ("Error updating there inbox!" . mysql_error()); } // Found? } // Post selectname ?> <html> <head> <title>Change Users Rank</title> </head> <body class='body'> <form action='' method='POST' name='Change Rank'> <table width='40%' border='1' cellpadding='0' cellspacing='0' class='table' align='center'> <tr> <td class='header' align='center' colspan='2'>Change Users Rank?</td> </tr> <tr> <td class='omg' align='center'>This will change the users Current Rank!</td> </tr> <tr> <td align='right'>Username:</td><td><input type='text' name='userchange' class='input'></td> </tr> <tr> <td><select name='name' size='1' class='dropbox'> <option value="1">Learner Driver (1)</option> <option value="2">Passed Driver (2)</option> <option value="3">New Driver (3)</option> <option value="4">Speeding Driver (4)</option> <option value="5">Skilled Driver (5)</option> <option value="6">Maniac Driver (6)</option> <option value="7">Wanted Racer (7)</option> <option value="8">Pro Driver (8)</option> <option value="9">Supreme Racer (9)</option> <option value="10">Super Supreme Racer (10)</option> <option value="11">Show Off Driver (11)</option> <option value="12">Extreme Show Off Driver (12)</option> <option value="13">Trained Driver (13)</option> <option value="14">Super Trained Driver (14)</option> <option value="15">Legendry Racer (15)</option> <option value="16">Most Legendry Racer (16)</option> <option value="17">Official SD Legend (17)</option> <option value="18">Hidden Rank! (18)</option></td> </tr> <tr> <td class='omg' align='center' colspan='2'><input type='submit' name='changerank' class='button'></td> </tr> </table> <br /> <table width='40%' border='1' cellpadding='0' cellspacing='0' class='table' align='center'> <tr> <td class='header' align='center' colspan='2'>Change Rank?</td> </tr> <tr> <td class='omg' align='center'>This will change the <strong>posted</strong> users Rank and Rep!</td> </tr> <tr> <td align='right'>Username:</td><td><input type='text' name='nameinput' class='input'></td> </tr> <tr> <td align='right'>Rank:</td><td><input type='text' name='rankinput' class='input'></td> </tr> <tr> <td align='right'>Rep:</td><td><input type='text' name='repinput' class='input'></td> </tr> <tr> <td align='center' colspan='2'><input type='submit' name='selectname' class='button'></td> </tr> </table> </form> </body> </html> Anyone able to see where I'm going wrong? Thanks I am working on a code that I started along time ago but having problem showing the end time, could somebody please have a look at my code to see what I am missing. Thanks Code: [Select] $getEvent_sql = "SELECT id, event_title, event_shortdesc, date_format(event_start, '%l:%i %p') as fmt_date, date_format(event_end, '%l:%i %p') as fmt_enddate FROM calendar_events WHERE month(event_start) = '".$m."' AND dayofmonth(event_start) = '".$d."' AND year(event_start)= '".$y."' ORDER BY event_start"; $getEvent_res = mysql_query($getEvent_sql, $mysql) or die(mysql_error($mysql)); if (mysql_num_rows($getEvent_res) > 0){ $event_txt = "<ul>"; while($ev = @mysql_fetch_array($getEvent_res)){ $evid = $ev["id"]; $event_title = stripslashes($ev["event_title"]); $event_shortdesc = stripslashes($ev["event_shortdesc"]); $fmt_date = $ev["fmt_date"]; $fmt_enddate = $ev["fmt_enddate"]; $event_txt .= "<li><a href=editevent.php?id=$evid>$editevent</a><a href=deleteevent.php?id=$evid>$deleteevent</a><strong>".$fmt_date."</strong>: ".$event_title."<br/>".$event_shortdesc."</li>"; } $event_txt .="</ul>"; mysql_free_result($getEvent_res); } else { $event_txt = ""; } mysql_close($mysql); if ($event_txt != ""){ echo "<p><strong>Today's Events:</strong></p> $event_txt <hr/>"; } |