Jump to content

khr2003

Members
  • Posts

    112
  • Joined

  • Last visited

    Never

Posts posted by khr2003

  1. or this code:

     

    while($row = mysql_fetch_array($result))
    {
      echo <<<END
      
      <div class="rbroundbox">
       <div class="rbtop"><div></div></div>
          <div class="rbcontent"><div class="mydiv">  $row['hotelname'] $row['address1'] $row['address2'],  $row['county'].'</div>'<p>     </p>'<div class='urdiv'>'<br/>       <img src=http://www..com/Website/images/$row['logo']  alt='logo' rel='lightbox[mando]' border='1' height='100' width='100'> </div><div class='hisdiv'><br/><font size = '6'> <strong><b>Hotel Bids € </b></strong></font><font size = '6'><strong>$row['hotelprice']</strong></font size><br /> Includes:  $row['addons']<br />Reference Number:  . $row['bookingref'].
          <br/><br />                                      
          <input type='image' src='BookThisHotel.PNG' name='image' width='121' height='24' onclick="window.location='bookview.php?em=$row['email']&id=$row['bookingref']&te=$row['telephone']&nh=$row['hotelname']"> 
          <input type='image' src='ViewHotel.PNG' name='image' width='90' height='24' onClick="window.open('viewhotel.php?id=$row['id'], 'mywindow', 'width=400, height=200')">
          </div></div><!-- /rbcontent -->   
       <div class="rbbot"><div></div></div>
    </div><!-- /rbroundbox -->";
    END;
    }
    

  2. I do not understand why you use ' so often. check this code and see if it working:

     

    
    while($row = mysql_fetch_array($result))
    {
       echo "<div class="rbroundbox">
       <div class="rbtop"><div></div></div>
          <div class="rbcontent"><div class="mydiv">  $row['hotelname'] $row['address1'] $row['address2'],  $row['county'].'</div>'<p>     </p>'<div class='urdiv'>'<br/>       <img src=http://www..com/Website/images/$row['logo']  alt='logo' rel='lightbox[mando]' border='1' height='100' width='100'> </div><div class='hisdiv'><br/><font size = '6'> <strong><b>Hotel Bids € </b></strong></font><font size = '6'><strong>$row['hotelprice']</strong></font size><br /> Includes:  $row['addons']<br />Reference Number:  . $row['bookingref'].
          <br/><br />                                      
          <input type='image' src='BookThisHotel.PNG' name='image' width='121' height='24' onclick=\"window.location='bookview.php?em=$row['email']&id=$row['bookingref']&te=$row['telephone']&nh=$row['hotelname']\"> 
          <input type='image' src='ViewHotel.PNG' name='image' width='90' height='24' onClick=\"window.open('viewhotel.php?id=$row['id'], 'mywindow', 'width=400, height=200')\">
          </div></div><!-- /rbcontent -->   
       <div class=\"rbbot\"><div></div></div>
    </div><!-- /rbroundbox -->";
                
    }
    

  3. it really depends on how you setup your login system. If you are using cookies then you can add a cookie with a username and a password in the else condition, so when your program checks for a member it will find this cookie and use it as a user.

     

    if you are using sessions to authenticate your users when they log in, you might want to read how to initiate sessions and how to add variable to this sessions array. check this link: http://au.php.net/manual/en/book.session.php

  4. see these links for the explanation of the functions:

    http://www.w3schools.com/PHP/func_string_htmlspecialchars.asp

    http://www.w3schools.com/PHP/func_string_trim.asp

     

    as of the second question I do not understand how it related to trim() or htmlspecialchars() functions since you use these functions before inserting data into mysql while the line you posted is to display the form straightaway from the php code.

     

    anyway try this code and see if its working:

    echo "<form action='nov.php' method='post'><input type='hidden' name='content' value='$content'><input type='submit' name='submit' value='Back to edit'></form>";
    

  5. since parse_ini_file produces an associative array (like this key => value) you have to change foreach loop accordingly to be like:

     

    function get_value_of($section,$item)
    {
      $ini_array = parse_ini_file("IDLE_names.ini", true);
      //print_r($ini_array);
      foreach ($ini_array as $key => $value)
      {
        if ($value == $section)
        {
          foreach ($value as $xkey => $xvalue)
          {
            if ($xkey == $item) { return "$xvalue"; }
          }
        }
      }
    }

     

    This function might not work properly but you get the idea

  6. You can use fread function, however some servers disable it due to security threats or you can use other function of reading a file, like:file_get_contents()

     

    or use curl, some of its functions might be disabled by some hosting services but you can change that through the php.ini file.

  7. if (!($t % 3)) $class = 'whatever';

    else $class = 'blah';

    Can you explain what the modulus symbol does?

    so that I may understand the other implementations for it.

     

    ...pleeease!

     

    Basically it divides the number $t reach in every loop, if the number is divisible by 3 (whith no reminder) then you can do whatever you like otherwise processed.

  8. This is a javascript issue and not a php. PHP is a server-side language (that means you have to submit something to the server, your page will be refreshed and you get the data), javascript is a client-side script meaning you can perform certain actions and see the results immediately. You may want to add an input button with its value the special characters you have and then apply a javascript code that will do what you requested.

     

    I might give you the code if you wanted.

  9. Simple

     

    I had this issue in one of my websites (but with a different code), the problem was in the host computers. Every time I removed it it came back and I tried everything but nothing worked. After 4 months I changed my cpanel password to a very complex one, and then problem solved :).

     

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