Jump to content

xoligy

Members
  • Posts

    232
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

xoligy's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. echo '</select></td></tr> <tr><td>Subject:</td><td><input type="text" name="subject" id="subject" size="59" /></td></tr> <tr><td>Message:</td><td><textarea name="message" cols="45" rows="5" value="'.$error['message'].'"></textarea></td></tr> <tr><td></td><td><input type="submit" name="send" value="Send!" /></td></tr> </table> </form> Try now </fieldset>';
  2. Im no coder but im bettin its just $text1 = mysql_real_escape_string(nl2br($post['text'])); As for the <br> tags there is a way of removing them but im not quite sure how so pass :-P
  3. Try changing the rq[0] to $rq[0] the [x] refers to the colum in the db (id, name, password, email = 0, 1, 2, 3 or there name)
  4. Thanks for that ajlisowski! Never seen that done in a tut
  5. Take it what i want isn't possible then :/
  6. Items table: Id | Item | Price | Img Useritems Id | Item_id | User_id | Qty So you have the items in one table and then when the user buys an item its added to the useritems table so if user brough 5x solidy gold bar in user items it would be inserted in user items as id: normally as a key auto increm item id: 2 user id: whatever there user id is (i use there id number) qty: 5 You then link it to the purchase screen. Hope that makes sense
  7. Your missing the end bracket "}" for and else statment which starts on line 757 else if ($sale_step == 'settings') /* settings page */ { Well that what phped says canna say wheere it goes im not that advanced :-P
  8. <?php include("poll_wags.php"); ?> http://thetop10women.com/poll_wags.php
  9. Ok i have tried a few variations of this code and all have come out the same it will show me the records of the selected numbers but i dont want that i want the ones not equal to them lol So i want it to display all the records in misisons where miss_id (in comp) is not equal to id (in missions) thought it be simple but i just get a blank table lol here is the funky code "select missions.id, missions.mission,missions.location, missions.level, missions.loot, missions.energy, missions.energy1, missions.bronze, missions.silver, missions.gold, missions.platinum, comp.miss_id, comp.user_id, comp.completed from missions, comp where comp.user_id=1 and comp.miss_id=missions.id"
  10. Thanks jt for having a look into it, after playing with the code i did sort it out was having a dumb moment i guess. I will definatly be having a deeper look into the unnecassary code removal tho that was interesting not seent hat in a tutoral yet Only isses i had with your code were... 1. table header was being showed on the links page (easily removed tho) 2. links still being showed here was all i had to do: <?php $action=$_GET['action']; if($action!=''){ echo'';}else{ ?> <table> <tr> <td><a href='missions.php?action=all'>All</a></td> </tr> <tr> <td><a href='missions.php?action=bronx'>Bronx</a></td> </tr> <tr> <td><a href='missions.php?action=downtown'>Downtown</a></td> </tr> <tr> <td><a href='missions.php?action=jersey'>Jersey</a></td> </tr> <tr> <td><a href='missions.php?action=vegas'>Las Vegas</a></td> </tr> <tr> <td><a href='missions.php?action=miami'>Miami</a></td> </tr> <tr> <td><a href='missions.php?action=chinatown'>Chinatown</a></td> </tr> </table> <?}?> Thanks again, now for me to play with the code remval i guess for smaller pages
  11. That table is what the user see's first, they then click what they want from that table and the correct table is displayed, but i dont want that table displayed after they have clicked it... i'll keep playing with it thanks
  12. Sure! <?php session_start(); if (!isset($_SESSION['username'])) { header("Location: login.php"); } include('db.php'); include('process.php'); ?> <title><?=$title?></title> <link rel="stylesheet" href="style.css" type="text/css" media="screen" /> <div id="container"> <div id="header"> <h1> Site name </h1> </div> <div id="navigation"> <ul> <li><a href="index.php">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Services</a></li> <li><a href="#">Contact us</a></li> </ul> </div> <div id="content-container"> <div id="section-navigation"> <ul> <?include'left.php';?> </ul> </div> <div id="content"> <? if($action=='all'){ $missions = mysql_query("select * from missions"); echo "<table border='1' width='750px'>"; echo "<tr><td colspan='9' align='center'>Missions</td></tr>"; echo "<tr><td>Mission</td><td>Level</td><td>Location</td><td>Loot</td><td>Total Ngy</td><td>bronze</td><td>bronze</td><td>bronze</td><td>bronze</td></tr>"; while($row = mysql_fetch_array( $missions )) { echo "<tr><td>".$row['mission']."</td><td>".$row['level']."</td><td>".$row['location']."</td><td>".$row['loot']."</td><td>".$row['energy1']."</td><td>".$row['bronze']."</td><td>".$row['silver']."</td><td>".$row['gold']."</td><td>".$row['platinum']."</td></tr>"; } echo "</table>"; } if($action=='bronx'){ $missions = mysql_query("select * from missions where location='bronx'"); echo "<table border='1' width='750px'>"; echo "<tr><td colspan='9' align='center'>Missions</td></tr>"; echo "<tr><td>Mission</td><td>Level</td><td>Location</td><td>Loot</td><td>Total Ngy</td><td>bronze</td><td>bronze</td><td>bronze</td><td>bronze</td></tr>"; while($row = mysql_fetch_array( $missions )) { echo "<tr><td>".$row['mission']."</td><td>".$row['level']."</td><td>".$row['location']."</td><td>".$row['loot']."</td><td>".$row['energy1']."</td><td>".$row['bronze']."</td><td>".$row['silver']."</td><td>".$row['gold']."</td><td>".$row['platinum']."</td></tr>"; } echo "</table>"; } if($action=='downtown'){ $missions = mysql_query("select * from missions where location='downtown'"); echo "<table border='1' width='750px'>"; echo "<tr><td colspan='9' align='center'>Missions</td></tr>"; echo "<tr><td>Mission</td><td>Level</td><td>Location</td><td>Loot</td><td>Total Ngy</td><td>bronze</td><td>bronze</td><td>bronze</td><td>bronze</td></tr>"; while($row = mysql_fetch_array( $missions )) { echo "<tr><td>".$row['mission']."</td><td>".$row['level']."</td><td>".$row['location']."</td><td>".$row['loot']."</td><td>".$row['energy1']."</td><td>".$row['bronze']."</td><td>".$row['silver']."</td><td>".$row['gold']."</td><td>".$row['platinum']."</td></tr>"; } echo "</table>"; } if($action=='jersey'){ $missions = mysql_query("select * from missions where location='jersey'"); echo "<table border='1' width='750px'>"; echo "<tr><td colspan='9' align='center'>Missions</td></tr>"; echo "<tr><td>Mission</td><td>Level</td><td>Location</td><td>Loot</td><td>Total Ngy</td><td>bronze</td><td>bronze</td><td>bronze</td><td>bronze</td></tr>"; while($row = mysql_fetch_array( $missions )) { echo "<tr><td>".$row['mission']."</td><td>".$row['level']."</td><td>".$row['location']."</td><td>".$row['loot']."</td><td>".$row['energy1']."</td><td>".$row['bronze']."</td><td>".$row['silver']."</td><td>".$row['gold']."</td><td>".$row['platinum']."</td></tr>"; } echo "</table>"; } if($action=='vegas'){ $missions = mysql_query("select * from missions where location='las vegas'"); echo "<table border='1' width='750px'>"; echo "<tr><td colspan='9' align='center'>Missions</td></tr>"; echo "<tr><td>Mission</td><td>Level</td><td>Location</td><td>Loot</td><td>Total Ngy</td><td>bronze</td><td>bronze</td><td>bronze</td><td>bronze</td></tr>"; while($row = mysql_fetch_array( $missions )) { echo "<tr><td>".$row['mission']."</td><td>".$row['level']."</td><td>".$row['location']."</td><td>".$row['loot']."</td><td>".$row['energy1']."</td><td>".$row['bronze']."</td><td>".$row['silver']."</td><td>".$row['gold']."</td><td>".$row['platinum']."</td></tr>"; } echo "</table>"; } if($action=='miami'){ $missions = mysql_query("select * from missions where location='miami'"); echo "<table border='1' width='750px'>"; echo "<tr><td colspan='9' align='center'>Missions</td></tr>"; echo "<tr><td>Mission</td><td>Level</td><td>Location</td><td>Loot</td><td>Total Ngy</td><td>bronze</td><td>bronze</td><td>bronze</td><td>bronze</td></tr>"; while($row = mysql_fetch_array( $missions )) { echo "<tr><td>".$row['mission']."</td><td>".$row['level']."</td><td>".$row['location']."</td><td>".$row['loot']."</td><td>".$row['energy1']."</td><td>".$row['bronze']."</td><td>".$row['silver']."</td><td>".$row['gold']."</td><td>".$row['platinum']."</td></tr>"; } echo "</table>"; } if($action=='chinatown'){ $missions = mysql_query("select * from missions where location='chinatown'"); echo "<table border='1' width='750px'>"; echo "<tr><td colspan='9' align='center'>Missions</td></tr>"; echo "<tr><td>Mission</td><td>Level</td><td>Location</td><td>Loot</td><td>Total Ngy</td><td>bronze</td><td>bronze</td><td>bronze</td><td>bronze</td></tr>"; while($row = mysql_fetch_array( $missions )) { echo "<tr><td>".$row['mission']."</td><td>".$row['level']."</td><td>".$row['location']."</td><td>".$row['loot']."</td><td>".$row['energy1']."</td><td>".$row['bronze']."</td><td>".$row['silver']."</td><td>".$row['gold']."</td><td>".$row['platinum']."</td></tr>"; } echo "</table>"; } if($action=='coney island'){ $missions = mysql_query("select * from missions where location='coney island'"); echo "<table border='1' width='750px'>"; echo "<tr><td colspan='9' align='center'>Missions</td></tr>"; echo "<tr><td>Mission</td><td>Level</td><td>Location</td><td>Loot</td><td>Total Ngy</td><td>bronze</td><td>bronze</td><td>bronze</td><td>bronze</td></tr>"; while($row = mysql_fetch_array( $missions )) { echo "<tr><td>".$row['mission']."</td><td>".$row['level']."</td><td>".$row['location']."</td><td>".$row['loot']."</td><td>".$row['energy1']."</td><td>".$row['bronze']."</td><td>".$row['silver']."</td><td>".$row['gold']."</td><td>".$row['platinum']."</td></tr>"; } echo "</table>"; } if($action=='moscow'){ $missions = mysql_query("select * from missions where location='moscow'"); echo "<table border='1' width='750px'>"; echo "<tr><td colspan='9' align='center'>Missions</td></tr>"; echo "<tr><td>Mission</td><td>Level</td><td>Location</td><td>Loot</td><td>Total Ngy</td><td>bronze</td><td>bronze</td><td>bronze</td><td>bronze</td></tr>"; while($row = mysql_fetch_array( $missions )) { echo "<tr><td>".$row['mission']."</td><td>".$row['level']."</td><td>".$row['location']."</td><td>".$row['loot']."</td><td>".$row['energy1']."</td><td>".$row['bronze']."</td><td>".$row['silver']."</td><td>".$row['gold']."</td><td>".$row['platinum']."</td></tr>"; } echo "</table>"; } ?> <table> <tr> <td><a href='missions.php?action=all'>All</a></td> </tr> <tr> <td><a href='missions.php?action=bronx'>Bronx</a></td> </tr> <tr> <td><a href='missions.php?action=downtown'>Downtown</a></td> </tr> <tr> <td><a href='missions.php?action=jersey'>Jersey</a></td> </tr> <tr> <td><a href='missions.php?action=vegas'>Las Vegas</a></td> </tr> <tr> <td><a href='missions.php?action=miami'>Miami</a></td> </tr> <tr> <td><a href='missions.php?action=chinatown'>Chinatown</a></td> </tr> </table> </div> <div id="footer"> <a href="http://www.maxdesign.com.au/articles/css-layouts/three-fixed/">max design layout</a> </div> </div> </div>
  13. Sorry should of posted an image of what i ment, i suppose the " " would work yes, and i guess i could add a condition that if the field is empty to echo " " in that empty field? Anyway here is a screenshot of the table and very basic site one row has the suggested answer in the first row and the second row how it normally would look (guess this issue is solved) http://img515.imageshack.us/img515/9631/whitespaces.png Next question is, im doing things by clicking a link 'missions.php?action=whatever' and the page displays the info required. Is tehre away to remove the links from the bottom without it messing up the layout? exit; } removes the css footer.
  14. Ok i have used a form to enter data into the db, now some of the fields i had to enter are blank. So when i called back the data from the db into a table i have horrid white spaces, whats the best way to deal with these? Calling the data: $missions = mysql_query("select * from missions where location='jersey'"); echo "<table border='1' width='750px'>"; echo "<tr><td colspan='9' align='center'>Missions</td></tr>"; echo "<tr><td>Mission</td><td>Level</td><td>Location</td><td>Loot</td><td>Total Ngy</td><td>bronze</td><td>bronze</td><td>bronze</td><td>bronze</td></tr>"; while($row = mysql_fetch_array( $missions )) { echo "<tr><td>".$row['mission']."</td><td>".$row['level']."</td><td>".$row['location']."</td><td>".$row['loot']."</td><td>".$row['energy1']."</td><td>".$row['bronze']."</td><td>".$row['silver']."</td><td>".$row['gold']."</td><td>".$row['platinum']."</td></tr>"; } Entering the data: if (!function_exists("cln")) { function cln( $value ){ if( get_magic_quotes_gpc() ){ $value = stripslashes( $value ); } //check if this function exists if( function_exists( "mysql_real_escape_string" ) ) { $value = mysql_real_escape_string(trim(strip_tags(htmlspecialchars(( $value ))))); } //for PHP version < 4.3.0 use addslashes else { $value = addslashes( $value ); } return $value; } } if($addmission){ $mission = cln($mission); $location = cln($location); $loot = cln($loot); $level = cln($level); $energy = cln($energy); $energy1 = cln($energy1); $bronze = cln($bronze); $silver = cln($silver); $gold = cln($gold); $platinum = cln($platinum); $result = mysql_query("INSERT INTO `missions` (`id`, `mission`, `location`, `loot`, `level`, `energy`, `energy1`, `bronze`, `silver`, `gold`, `platinum`) VALUES (NULL, '".$mission."', '".$location."', '".$loot."', '".$level."', '".$energy."', '".$energy1."', '".$bronze."', '".$silver."', '".$gold."', '".$platinum."')") or die (mysql_error()); //echo $result; } Thanks for any help in advance
×
×
  • 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.