Jump to content

Reaper0167

Members
  • Posts

    270
  • Joined

  • Last visited

    Never

Posts posted by Reaper0167

  1. If you take a look at the way it appears now, I had to create a background color on the list menu that was close to the gradient image behind it. What I am looking to do, if possible, is get rid of that sold background color and have the list menu transparent so that the gradient image appears as the list menu background.  I was able to do a semi transparent list menu, but then the text in the menu was also semi transparent. Are there any ways to do this?

     

    ooppss, sorry I overread where you mentioned to use a UL.. I'll check into that. But if someone else wants to chime in, let me know, thanks.

  2. a user can go back and update their profile, to display what they previously selected from the radio buttons, i use the following

    <?php if($gender_prof == 'male') { echo '
          <input name="gender" type="radio" id="gender" value="male" checked="checked" /> male  
          <input type="radio" name="gender" id="female" value="female" /> female'; } else { echo ''; } ?> 
          <?php if($gender_prof == 'female') { echo '
                <input name="gender" type="radio" id="gender" value="male" /> male  
          <input type="radio" name="gender" id="female" value="female" checked="checked" /> female'; } else { echo ''; } ?>
    

    Is this an ok way to acomplish this, or is there a better way?

  3. I know what you mean,

    switch

    $delete_this = $_GET['delete_id'];

     

    to

    $delete_this = mysql_real_escape_string($_GET['delete_id']);

     

    and yes, I had $got_you in the code for future add-ons to the script, it is probably best to leave it out til it is needed?

     

    So would that be about it with the mysql_real_escape_string ?

     

    What else could someone do?

  4. Is there anything else that I should have, security I mean?

     

    <?php
    session_start();
    
    if( (isset($_SESSION['who'])) || (isset($_SESSION['auth'])) )
    {
      include 'connection.php';
      $delete_this = $_GET['delete_id'];
      $got_you = $_SESSION['who'];
      $result = mysql_query("SELECT * FROM my_table WHERE id = '$delete_this' ");
      while ($row = mysql_fetch_array($result))	
      {
       $server_pic = $row['imgpath'];
       $server_file = $row['track_loc'];
      }
      unlink($server_pic);  //removes picture from server
      unlink($server_file);  //removes file from server
      mysql_query("DELETE FROM my_table WHERE id='$delete_this'");  //remove track info from db
      mysql_query("DELETE FROM my_table2 WHERE track_id = '$delete_this'");  //remove track comments from db
      mysql_query("DELETE FROM my_table3 WHERE track_id = '$delete_this'");  //remove best lap time info from db
    
      mysql_close();
      header("location:my_page.php");
      exit();
    }
    
    ?>
    

  5. I'm looking to create a secure page that will pretty much show what is in my databse. This page will also allow me to edit what is in the database(delete,modify,etc.) What would the be the best way to secure this from other members reaching this page? I was thinking

     

    -check ip, if ip is mine let me in, if not, no entry

    -check session member name, same as above

     

    I really need to have this page secure so all the other members could not go in and delete anything.

     

    Any ideas?

     

     

  6. The code at the bottom of this post works, I would like to also add something like this to it

    (document.form2.track.value.lastIndexOf(".rar",".zip")==-1)

    The text box id track can only accept a .rar or a .zip,

    I'm sure the code above is wrong. Could anyone help me out so that i could add it to the coding below. Thanks.

     

     

    if ((!form2.track_name.value) || (!form2.description.value) || (!form2.track.value) || (!form2.image.value) || (document.form2.image.value.lastIndexOf(".jpg")==-1))
    {
           	var messID = document.getElementById("flash_vid_table");
    	messID.style.display = "none";
    
    }
    else
    {
        	var messID = document.getElementById("flash_vid_table");
    	messID.style.display = "block";
    	document.body.style.cursor = 'wait';
    }
    

  7. I can't get this to function properly. It gets the ip address, it the ip is a certain ip, it does not add it to the counter and displays the same count, otherwise add it to the counter and display it. With the code below, it just displays "0 times"

    <?php
    session_start();
    $ip=$_SERVER['REMOTE_ADDR'];
    if ($ip != '184.59.170.237')
    {
    $guy = fopen('counterlog.txt', r);
    $dog = fread($guy, filesize('counterlog.txt'));
    echo 'This site has been visited&nbsp' . $dog+1 . ' times.';
    fclose($guy);
    $guy = fopen('counterlog.txt', w);
    fwrite($guy, $dog+1);
    }
    else
    {
    $guy = fopen('counterlog.txt', w);
    fwrite($guy, 1);
    echo 'This site has been visited&nbsp' . $dog+0 . ' times.';
    fclose($guy);
    }
    ?>
    

    This seems to not work properly

  8. here is the whole block of code that i recently tried. my flash video won't play at all, even if category and physics value is something other than 1. that is my only prob.

    if ((!form2.track_name.value) || (!form2.description.value) || (!form2.track.value) || (!form2.image.value) || (form2.category.value !== 1) || (form2.physics.value !== 1))
    {
           	var messID = document.getElementById("flash_vid_table");
    	messID.style.display = "none";
    
    }
    else
    {
        	var messID = document.getElementById("flash_vid_table");
    	messID.style.display = "block";
    	document.body.style.cursor = 'wait';
    }
    

  9. if ((!form2.track_name.value) || (!form2.description.value) || (!form2.track.value) || (!form2.image.value) || (form2.category.value != 1) || (form2.physics.value != 1))
    

     

    cant seem to get this right. i'm looking to have the statment say  that if    track_name, description, track and image are not empty, and category and physics do not have a value of 1, then do something.  the only part that i can't get to work properly is the category and physics not having a value of 1.

  10. i have a text field which users can paste video embed code which will then get inserted into a database. what i'm looking to do is always have the same size, color(all the properties that are in the example below) no matter what the user changes in there embed code before they pasted it in the text field.

    <object width="320" height="265"><param name="movie" value="http://www.youtube.com/v/ZuwP5C-1jJU&hl=en_US&fs=1&rel=0&color1=0xe1600f&color2=0xfebd01"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ZuwP5C-1jJU&hl=en_US&fs=1&rel=0&color1=0xe1600f&color2=0xfebd01" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="265"></embed></object>
    

    If anyone understands what I am explaining, is there a way to do this. I don't want the user to paste an embed code with a huge width and height. And even if they do, i would like to have it changed to the 320 by 265 on the fly. Thanks.

  11. I was browsing around google and came across this script.    What does the -> stand for?

    <?php
    include_once ("usersOnline.class.php");
    $visitors_online = new usersOnline();
    
    if (count($visitors_online->error) == 0) {
    
    if ($visitors_online->count_users() == 1) {
    	echo "There is " . $visitors_online->count_users() . " visitor online";
    }
    else {
    	echo "There are " . $visitors_online->count_users() . " visitors online";
    }
    }
    else {
    echo "<b>Users online class errors:</b><br /><ul>\r\n";
    for ($i = 0; $i < count($visitors_online->error); $i ++ ) {
    	echo "<li>" . $visitors_online->error[$i] . "</li>\r\n";
    }
    echo "</ul>\r\n";
    
    }
    ?>
    

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