Jump to content

ludjer

Members
  • Posts

    60
  • Joined

  • Last visited

Posts 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. 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

     

  3. this is because you probably copied and pasted the text from Microsoft's word or something, and the encoding is not the same, just go into your db and delete the ' thats there and enter a new one with your keyboard

     

    why thanks that works

     

    gj

  4. Guys from OEM are back with another unheard of DVDSCR, and this time its for Black Ops. OEM stated in their nfo that this movie doesn’t have an IMDB page but they overlooked the fact that this movie is also called Deadwater, and that has an IMDB page. Although the title is very catchy, I feel the movie might not be so if you really want a movie about black ops soldiers I think you should check out The Bourne Ultimatum.

    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

    Guys from OEM are back with another unheard of DVDSCR, and this time its for Black Ops. OEM stated in their nfo that this movie doesn�t have an IMDB page but they overlooked the fact that this movie is also called Deadwater, and that has an IMDB page. Although the title is very catchy, I feel the movie might not be so if you really want a movie about black ops soldiers I think you should check out The Bourne Ultimatum.

     

    it for some reason prints out a � instead of a '

    can some one help me thanks

  5. 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%;
    }
    

  6. 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

    Access forbidden!

     

    You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

     

    If you think this is a server error, please contact the webmaster.

    Error 403

    and alias would not let me start my server

     

    is there anyway i can do this

     

    thanks in advanced

  7. 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

  8. this is what i get when i run it if

    $positioncheck = 1

    $positioncheck = ($positioncheck+1);

    if $positioncheck = 2

    $positioncheck = ($positioncheck+1);

    if $positioncheck = 3

    $positioncheck = ($positioncheck+1);

    if $positioncheck = 4

    $positioncheck = ($positioncheck+1);

    if $positioncheck = 5

    $positioncheck = ($positioncheck+1);

    if $positioncheck = 6

    $positioncheck="box";

    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

  9. look here

    1

    $positioncheck = ($positioncheck+1);

    2

    $positioncheck = ($positioncheck+1);

    3

    $positioncheck = ($positioncheck+1);

    4

    $positioncheck = ($positioncheck+1);

    5

    $positioncheck = ($positioncheck+1);

    6

    $positioncheck = ($positioncheck+1);

    $positioncheck="box";

    <?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

     

  10. you need to use GET.

     

    $id = $_GET['id'];
    $nid = $_GET['nid'];
    $item = $_GET['item'];
    
    echo $id; //would show 'news'
    echo $nid; //would show 'show'
    echo $item; //would show '4'.
    

     

     

    ??? 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

  11. 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.