Jump to content

ludjer

Members
  • Posts

    60
  • Joined

  • Last visited

Everything posted by ludjer

  1. just add to your while loop a and expression $query = "SELECT CONCAT('',name,name2,name3,name4,name5,name6,name7,name8,name9,name10) as n FROM $usertable HAVING n LIKE '%$name%'"; $result = mysql_query($query) or DIE("Could not Execute Query on table $usertable"); $i = 0; if ($result) { print "Query successful on table $usertable<br><br>"; print "Your Query returned:<br>"; while ($row = mysql_fetch_array($result)&& $i != $maxrows) { $i++; print $row['n'] . "<br/>"; } }
  2. thanks alot that helps alot, now that i know that i think i will use / only now and spaces? do i still have to escape them or not?
  3. whats the difference between file systems in Linux and windows when using php file commands and stuff? im doing a PHP project on my windows pc, but it will be running on a linux server now i need to know what are the main differences when it comes to handling files on different files system using php? what must i look out for and how to make sure it is multi thanks alot in advance
  4. whats the difference between file systems in Linux and windows im doing a project on my windows pc, but it will be running on a linux server now i need to know what are the main differences when it comes to handling files on different files system? thanks alot in advance
  5. got it http://www.w3schools.com/XSL/el_attribute.asp should have spent some more time looking
  6. i have xml data: http://paste2.org/p/66173 loading this template: http://paste2.org/p/66175 now how would i link the menu items? cause it always gives me problems with parsing it of i try: <a href="<xsl:value-of select="Link"/>"/><xsl:value-of select="Name"/></a> is there someway i can put data into a <a href=""/> </a> just to link the items thanks in advance
  7. who did the coding of your webpage?? ask them to have a look cause it is something to do with the code not the server
  8. that is the text that i read with my sql manager when i print it out in php connect(); $qur = "SELECT * FROM `blog_post` ORDER BY ID DESC LIMIT $start , $stop"; $show = mysql_query($qur)or die(sqlerr($qur,mysql_error(),mysql_errno())); while ($r = mysql_fetch_assoc($show)) { echo $r["Content"]; } i get the following it for some reason prints out a � instead of a ' can some one help me thanks
  9. ludjer

    CSS DIV Help

    http://ludgers.pcriot.com/ as you see the shadow thingies at the sides are not going right to the bottem or the top T_T can some one help me here is the html <!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=iso-8859-1" /> <title>Untitled Document</title> <link rel="stylesheet" href="main.css" type="text/css" /> </head> <body> <div id="wrapper"> <div id="top"> <center><img src="Images/headder.png" alt="Ludgers Headder" border="0" usemap="#Map" /> <map name="Map" id="Map"><area shape="rect" coords="181,118,266,144" href="index.php" target="_self" /> <area shape="rect" coords="296,119,372,141" href="index.php?main=links" /> <area shape="rect" coords="409,120,522,142" href="index.php?main=projects" /> <area shape="rect" coords="567,120,652,143" href="index.php?main=about" /> <area shape="rect" coords="702,120,784,142" href="index.php?main=work" /> </map></center> <div class="clearer"> </div> </div> <div id="topmid" align="center"> <table width="800" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="800" id="topic"> </td> </tr> </table> </div> <div class="middle"> <div class="container"> <div class="midleft"> </div> <div class="midright"> </div> <div class="middle">middle </div> </div> </div> <div id="footer"> <div id="footercont"> <br /> Designed And Coded by <a href="mailto:ludjer@gmail.com">Ludger</a><br /> <a href="http://www.mysql.com/" target="_blank"> <img src="Images/mysql.gif" alt="Powered by MySQL" border="0" height="31" width="88"/></a> <a href="http://www.php.net/" target="_blank"> <img src="Images/php.gif" alt="Powered by PHP" border="0" height="31" width="88"/></a> <a href="http://validator.w3.org/check/referer" target="_blank"> <img src="Images/valid-xhtml10.gif" alt="Valid XHTML 1.0!" border="0" height="31" width="88" /></a> <a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank"> <img src="Images/valid-css.gif" alt="Valid CSS!" border="0" height="31" width="88"/> </a> </div> </div> </div> </body> </html> and here is the css body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #333; background-image:url(Images/midbg.png); text-align: center; margin: 0px; padding: 0px; } #wrapper { width: 100%; margin: 0px; height: 100%; text-align: left; border: 1px solid #ddd; } #wrapper #middle #middletab { height: 100%; width: auto; } #container { padding: 0px; margin: 10px 0px 0px 0px; background-attachment: scroll; background-image: url(back.gif); background-repeat: repeat-y; background-position: 0px 0px; height: 1%; width: auto; } #center { height: auto; width: 504px; padding: 10px 20px 10px 20px; float: left; margin: 0px 0px 0px 6px; line-height: 1.8em; } #right { padding: 10px 20px 10px 20px; height: auto; width: 160px; float: left; margin: 0px 0px 0px 6px; } .clearer { font-size: 0px; line-height: 0px; display: block; margin: 0px; padding: 0px; clear: both; height: 0px; width: auto; } #center { height: auto; width: 504px; padding: 10px 20px 10px 20px; float: left; margin: 0px 0px 0px 6px; line-height: 1.8em; } #topcenter { padding: 0px; margin: 0px; text-align: center; width: 800px; } #top { padding: 0px; margin: 0px; background-attachment: scroll; background-image: url(Images/topbg.png); background-repeat: repeat-x; background-position: 0px 0px; height: 150px; width: 100%; } #wrapper #topmid { background-image: url(Images/darkbg.png); background-repeat: repeat-x; } #wrapper #topmid #topic { background-image: url(Images/midbluebg.png); background-repeat: repeat-x; height: 100px; width: 800px; } #wrapper #middle #midleft { background-image: url(Images/midleftblue.png); background-repeat: repeat-y; width: 50px; background-attachment: fixed; background-position: right top; } #wrapper #middle #content { width: 790px; padding-top: 5px; padding-right: 5px; padding-bottom: 0px; padding-left: 5px; background-color: #FFFFFF; } #wrapper #middle #midright { background-image: url(Images/midrightblue.png); background-repeat: repeat-y; width: 50px; background-attachment: fixed; background-position: left top; } #wrapper #middle { background-image: url(Images/midbg.png); width: 100%; } #wrapper #footer { background-image: url(Images/footer.png); height: 80px; width: 100%; text-align: center; vertical-align: middle; } img{ border:0; }#wrapper #footer #footercont { width: 800px; margin-left: auto; margin-right: auto; font-size: 16px; color: #FFFFFF; } #wrapper #footer #footercont #icons { float: right; width: 400px; } #wrapper #footer #footercont #footertext { float: left; width: 400px; text-align: center; vertical-align: text-bottom; } #wrapper .middle .container { margin-right: auto; margin-left: auto; width: 900px; } #wrapper .middle .container .midleft { float: left; width: 50px; background-image: url(Images/midleftblue.png); background-repeat: repeat-y; height: inherit; } #wrapper .middle .container .midright { float: right; width: 50px; background-image: url(Images/midrightblue.png); background-repeat: repeat-y; height: inherit; } #wrapper .middle .container .middle { width: 780px; background-color: #FFFFFF; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 50px; padding: 10px; height: 100%; }
  10. you will need to use ajax for that. i am not to sure on how to do it but you can try search google for that
  11. i have a apache server running on my computer at home, i would like it to when ever i request http://ip address/d-drive/ to goto d:\, i tried ScriptAlias /d-drive/ "D:/" ScriptAlias /e-drive/ "E:/" ScriptAlias /f-drive/ "F:/" and Alias /f drive F:\ Alias /e drive E:\ Alias /d drive D:\ ScriptAlias gave me and alias would not let me start my server is there anyway i can do this thanks in advanced
  12. try get all the names and id's into a array $arr = array( "fileid" => array(), "fname" => array()); $arr[fileid][0] = "fileid1"; $arr[fname][0] = "filename1"; use a for loop to search it, i think that would be the fastest
  13. i would advise using a link instead of a button. here is a example, i dont know to much about java script but i think this is how you would do it: <a href="javascript:void(0);" onclick="java function"><img src"button.jpg></a>
  14. you will include it like this <?php include "./../include.php"; ?>
  15. this is a function i run before i put anything into a sql query <?php function sql_safe($value) { if (get_magic_quotes_gpc()) { $value = stripslashes($value); } if (!is_numeric($value) || $value[0] == '0') { $value = mysql_real_escape_string($value); } return $value; } ?> i also run this function to what ever the user puts in: $comment = htmlspecialchars($comment); htmlspecialchars() takes away all the html characters read more about it here http://za.php.net/manual/en/function.htmlspecialchars.php also have a look here http://www.talkphp.com/showthread.php?p=1804#post1804
  16. try store the first guys IP and time in IP_address and time_last_active columns in the mysql database and create a script that will not allow anyone other then that IP to use that username to browse the site during the 5 min activity time
  17. OMG dude you are 1337 thanks
  18. this is what i get when i run it if i moved my code around like this: $result = mysql_query("SELECT * FROM pokemons where username='".$Valid_User."' order by position desc limit 1") or die(mysql_error()); $row = mysql_fetch_array( $result ); $positioncheck = $row['position']; if($positioncheck>=6){ $positioncheck="box"; } if(!isset($positioncheck) OR $positioncheck=="" OR $positioncheck=="0"){ $positioncheck=1; elseif($positioncheck <6) $positioncheck = ($positioncheck+1); } case the $positioncheck = ($positioncheck+1); will make $positioncheck goto 6 when it is 5
  19. look here <?php for($i =1;$i <7;$i++) { echo $i."<br>"; $positioncheck = $i; if(!isset($positioncheck) OR $positioncheck=="" OR $positioncheck=="0"){ $positioncheck=1; echo '$positioncheck=1;<br>'; }else{ $positioncheck = ($positioncheck+1); echo '$positioncheck = ($positioncheck+1);<br>'; } if($positioncheck>6){ $positioncheck="box"; echo '$positioncheck="box";<br>'; } } ?> it will always do $positioncheck = ($positioncheck+1); if this is false !isset($positioncheck) OR $positioncheck=="" OR $positioncheck=="0" if i understand you right try this replace else{ with elseif($positioncheck <6) { so it looks like this $result = mysql_query("SELECT * FROM pokemons where username='".$Valid_User."' order by position desc limit 1") or die(mysql_error()); $row = mysql_fetch_array( $result ); $positioncheck = $row['position']; if(!isset($positioncheck) OR $positioncheck=="" OR $positioncheck=="0"){ $positioncheck=1; elseif($positioncheck <6) $positioncheck = ($positioncheck+1); } if($positioncheck>=6){ $positioncheck="box"; } i think that is what you want
  20. ??? so there is no way to get the thing in whole, lets say some one loges on and i want them to return to this webpage there on, will i have to create one for everytype of page :\ if thats the only way ill design some sort of function anyway peace out and thanks
  21. lets say i am at a webpage with a headder index.php?id=news&nid=show&item=4 what piece of code will allow me to get what is in the url bar thanks
  22. i found my problem if i run the $comments through the sqlsafe before putting it into the sql query anbd not run the query through the sqlsafe it works, sql safe gave this INSERT INTO mainp_com (newsid , userid , comment , time , date1) VALUES (\'9\', \'2\', \'i am the most l337 of them all\', \'04:05:41 AM\', \'October 7 2007\') and i needed this INSERT INTO mainp_com (newsid , userid , comment , time , date1) VALUES ('9', '2', 'i am the most l337 of them all', '04:05:41 AM', 'October 7 2007') thanks all
×
×
  • 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.