Jump to content

freemancomputer

Members
  • Posts

    66
  • Joined

  • Last visited

Posts posted by freemancomputer

  1. I am finishing up a mobile version of my web site and have run into a bit of a snag with the redirect. I have a test page that i can visit with my phone and it will send me to the mobile version of the site no problem, but only the home page. What I am looking for is if someone comes to my site from google, or any othere site, and is using a mobile device it will redirect them to the same page on the mobile site. So if you come to the page drinktothecredits.com/movies and you are using a phone it will send you to mobi.drinktothecredits.com/movies. I also want tablets it use the full site.

     

    I know that I need to be able to some how send the url to the mobile site but I am unsure how to do this.

     

    Thank you

     

    Here is what I have so far.

     

    <?php
    $useragent=$_SERVER['HTTP_USER_AGENT'];
    if(preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i',substr($useragent,0,4)))
    header('Location: http://mobi.drinktothecredits.com/');
    ?>
    

  2. I currently have this code that shows a certain number of images depending on what the rating is 1-5. I know that there has to be a better way of doing this, but i can not think of it. Any pointers would be helpful.

     

    if($user_rating_show==1)
    {
    echo "<img src='../img/beer_mug_finish-green.jpg' alt='beer_m' name='beer_mug' width='34' height='33'>";
    }
    if($user_rating_show==2)
    {
    echo "<img src='../img/beer_mug_finish-green.jpg' alt='beer_m' name='beer_mug' width='34' height='33'>";
    echo "<img src='../img/beer_mug_finish-green.jpg' alt='beer_m' name='beer_mug' width='34' height='33'>";
    }
    if($user_rating_show==3)
    {
    echo "<img src='../img/beer_mug_finish-green.jpg' alt='beer_m' name='beer_mug' width='34' height='33'>";
    echo "<img src='../img/beer_mug_finish-green.jpg' alt='beer_m' name='beer_mug' width='34' height='33'>";       
    echo "<img src='../img/beer_mug_finish-green.jpg' alt='beer_m' name='beer_mug' width='34' height='33'>";
    }
    if($user_rating_show==4)
    {
    echo "<img src='../img/beer_mug_finish-green.jpg' alt='beer_m' name='beer_mug' width='34' height='33'>";
    echo "<img src='../img/beer_mug_finish-green.jpg' alt='beer_m' name='beer_mug' width='34' height='33'>";
    echo "<img src='../img/beer_mug_finish-green.jpg' alt='beer_m' name='beer_mug' width='34' height='33'>";
    echo "<img src='../img/beer_mug_finish-green.jpg' alt='beer_m' name='beer_mug' width='34' height='33'>";
    }
    if($user_rating_show==5)
    {
    echo "<img src='../img/beer_mug_finish-green.jpg' alt='beer_m' name='beer_mug' width='34' height='33'>";
    echo "<img src='../img/beer_mug_finish-green.jpg' alt='beer_m' name='beer_mug' width='34' height='33'>";
    echo "<img src='../img/beer_mug_finish-green.jpg' alt='beer_m' name='beer_mug' width='34' height='33'>";
    echo "<img src='../img/beer_mug_finish-green.jpg' alt='beer_m' name='beer_mug' width='34' height='33'>";
    echo "<img src='../img/beer_mug_finish-green.jpg' alt='beer_m' name='beer_mug' width='34' height='33'>";
    }
    

     

    Thanks

  3. I am working on a site redesign and as part of that I want to do an url rewrite. Currently my page looks like /rules.php?title=Ax+men i would like them to look like /Ax-men. Keep in mind that the title will change and can contain letters an numbers

     

    I have done this before with numbered pages but am not sure how to adapt it to a variable length and text and numbers. This will also have to work with pagination, and with old back links that might be out there

     

    This is what I had on a different site

     

    #Options +FollowSymlinks
    #RewriteEngine on
    #RewriteRule ^(.*)\.htm$ $1.php [nc]
    
    
    Options +FollowSymlinks
    RewriteEngine on
    RewriteRule ^story-([0-9]+)\.html$ story.php?currentpage=$1
    

     

    Mainly looking for tips and pointers

  4. I have a simple user bio section on my web site. As of right now everything works fine except that the bios are not formatted and I want to remove any html that the user adds. I know that strp_tags is used to remove html but wasn't sure if I could used that along side adding my own html. The html that I am looking to add is <P> and <br> to properly format them.

     

     

    this is the form that I have that

     

    <form id="update_profile">
    <textarea name="BIO" cols="50" rows="6"><?php echo $bio; ?></textarea><br>
    <span class="rulemain">Your Favorite drink: </span><br>
    <input type="text" name="FAV_DRINK" value="<?php echo $fav_drink; ?>" > <br>
    <input type="radio" name="SHARE_EMAIL" value="1" > <span class="rulesub">Share my email.</span><br>
    <input type="hidden" name="USER_ID" value="<?php echo $name; ?>">
    <input type="submit" value="Update Profile">
    </form>
    

     

    Here is what the update string looks like

     

    <?php
    include"scripts/connect.php" ;
    mysql_connect('localhost',$username,$password);
    @mysql_select_db($database) or die( "Unable to select database");
    $bio= mysql_real_escape_string($_POST['BIO']);
    $user = mysql_real_escape_string($_POST['USER_ID']);
    $drink= mysql_real_escape_string($_POST['FAV_DRINK']);
    $share_email= mysql_real_escape_string($_POST['SHARE_EMAIL]);
    
    $error = '';
    $userquery = mysql_query("SELECT * FROM user WHERE (username='$user')");
    $sql = ("UPDATE user SET bio='$bio', drink='$drink', show_email='$share_email' WHERE username='$user'") or die (mysql_error());
    $query = mysql_query($sql);
    

  5. Thanks for your help but I am getting this error

    Fatal error: SQL in /home/drinktot/public_html/movies.php on line 46

     

    This is likes 45-47

    //Run query to get records for current page
    $offset = ($current_page - 1) * $rec_per_page;
    $query = "SELECT title FROM movie WHERE type = 'movie' ORDER BY title LIMIT $offset, $rec_per_page";
    $result = mysql_query($query) or trigger_error("SQL", E_USER_ERROR);

     

    I been scratching my head on this for about an hour today.

     

    Thanks again for your help

  6. I have a web site that is showing a list with pagination. Right now its listing in one column. I would like it to show 50 links on a page in 2 columns. I think I know in theory how this should work but I'm not sure.

     

    This is the code that i have now, and this is my site http://www.drinktothecredits.com/movies.php

     

    <?php
    
    include"scripts/connect.php" ;
    
    mysql_connect('localhost',$username,$password);
    @mysql_select_db($database) or trigger_error("SQL", E_USER_ERROR);
    
    $sql = "SELECT COUNT(*) FROM movie WHERE type LIKE 'movie'";
    $result = mysql_query($sql) or trigger_error("SQL", E_USER_ERROR);
    $r = mysql_fetch_row($result);
    $numrows = $r[0];
    $rowsperpage = 25;
    $totalpages = ceil($numrows / $rowsperpage);
    
    
    if (isset($_GET['currentpage']) && is_numeric($_GET['currentpage'])) {
       $currentpage = (int) $_GET['currentpage'];
    } else {
       $currentpage = 1;
    }
    if ($currentpage > $totalpages) {
       $currentpage = $totalpages;
    } 
    if ($currentpage < 1) {
       $currentpage = 1;
    } 
    
    $offset = ($currentpage - 1) * $rowsperpage;
    $sql = "SELECT title FROM movie WHERE type LIKE 'movie' ORDER BY title LIMIT $offset, $rowsperpage" ;
    $result = mysql_query($sql) or trigger_error("SQL", E_USER_ERROR);
    ?>
    
    
    <div align="center"><span class="rulemain ">Movies</span></div><br>
    <?php
    while ($list = mysql_fetch_assoc($result)) {
         ?>
        
    <li> <a class="nav" href=/rules.php?title=<?php echo urlencode($list['title']); ?>><?php echo $list['title']; ?></a> </li>
    
    <?php
    } 
    $range = 3;
    
    if ($currentpage > 1) {
       echo " <a class='nav' href='movies.php?currentpage=1'><<</a> ";
       $prevpage = $currentpage - 1;
       echo " <a class='nav' href='movies.php?currentpage=$prevpage'><</a> ";
    } 
    for ($x = ($currentpage - $range); $x < (($currentpage + $range) + 1); $x++) {
       if (($x > 0) && ($x <= $totalpages)) {
          if ($x == $currentpage) {
             echo " [<b>$x</b>] ";
          } else {
             echo " <a class='nav' href='movies.php?currentpage=$x'>$x</a> ";
          } 
       } 
    } 
            
    if ($currentpage != $totalpages) {
       $nextpage = $currentpage + 1;
        
       echo " <a class='nav' href='movies.php?currentpage=$nextpage'>></a> ";
       echo " <a class='nav' href='movies.php?currentpage=$totalpages'>>></a> ";
    } 
    ?>
    

  7. Kevin-

     

    Your feed back is just what I have been looking for. When this site first started out it was to be simple, then as all things do it got complex. I'm getting ready to do a overhaul of the whole thing and these are going into my suggestion box, most to be used.

     

    Thank you.

  8. Old habits die hard, you pick up a lot of bad ones when you teach or self along the way.

     

    This does make the code flow a lot better but it does not fix the problem. If a movie has not been added to the to_watch table and is not in the rateing table the to-watch form should come up with the button but this does not happen, only the rating form shows. If the move is in the to_watch table only the rating form shows along with the "This is in your to play list" statement.

     

    Here is where I am at. From the start of the div that its located in to the end. I know there is a better way of doing the rating images and that's my next project.

     

    Thanks

     

    <div id="rule_your_rating"> 
    <?php
    if($rank>=1){
    include"scripts/connect.php" ;
    mysql_connect('localhost',$username,$password);
    @mysql_select_db($database) or die( "Unable to select database");
    $userquery_show_rating = mysql_query("SELECT * FROM rateing WHERE (movie_id='$id') AND (user_id='$loggedinusername')");
    
    if (mysql_num_rows($userquery_show_rating) > 0) {
    
    	$user_rating_show = mysql_result($userquery_show_rating,$i,"rating");
    	echo "<tr><td><span class='rulemain'>Your Rating:</span><br>";
    		if($user_rating_show==1)
    		{
    			echo "<img src='beer_mug_finish.jpg' name='beer_mug' width='50' height='50'>";
    		}
    		if($user_rating_show==2)
    		{
    			echo "<img src='beer_mug_finish.jpg' name='beer_mug' width='50' height='50'>";
    			echo "<img src='beer_mug_finish.jpg' name='beer_mug' width='50' height='50'>";
    		}
    		if($user_rating_show==3)
    		{
    			echo "<img src='beer_mug_finish.jpg' name='beer_mug' width='50' height='50'>";
    			echo "<img src='beer_mug_finish.jpg' name='beer_mug' width='50' height='50'>";
    			echo "<img src='beer_mug_finish.jpg' name='beer_mug' width='50' height='50'>";
    		}
    		if($user_rating_show==4)
    		{
    			echo "<img src='beer_mug_finish.jpg' name='beer_mug' width='50' height='50'>";
    			echo "<img src='beer_mug_finish.jpg' name='beer_mug' width='50' height='50'>";
    			echo "<img src='beer_mug_finish.jpg' name='beer_mug' width='50' height='50'>";
    			echo "<img src='beer_mug_finish.jpg' name='beer_mug' width='50' height='50'>";
    		}
    		if($user_rating_show==5)
    		{
    			echo "<img src='beer_mug_finish.jpg' name='beer_mug' width='50' height='50'>";
    			echo "<img src='beer_mug_finish.jpg' name='beer_mug' width='50' height='50'>";
    			echo "<img src='beer_mug_finish.jpg' name='beer_mug' width='50' height='50'>";
    			echo "<img src='beer_mug_finish.jpg' name='beer_mug' width='50' height='50'>";
    			echo "<img src='beer_mug_finish.jpg' name='beer_mug' width='50' height='50'>";
    		}
    
    }
    	else {
    	?>
    	<script type="text/javascript">
    
    	$(function() {
    	     $('#add-rating').submit(function(event) {
    	            event.preventDefault()
    	            $(this).hide('fast');
    	            $(div_show).hide('fast');
    	            var movie_rating_s = $('#add-rating [name="MOVIE_RATING"]:checked').val();
    	            var movie_id_s = $('#add-rating [name="MOVIE_ID"]').val();
    	            var movie_title_s = $('#add-rating [name="MOVIE_TITLE"]').val();
    	            var user_id_s = $('#add-rating [name="USER_ID"]').val();
    	            $.ajax({type: 'POST', url: 'movie_watched.php', cache: false, timeout: 10000,
    	                  data: {rating: movie_rating_s, movie: movie_id_s, title: movie_title_s, user: user_id_s},
    	                  success: function() {
    	                        var html = '<br/>';
    	                        for (var i = 0; i < movie_rating_s; i++) {
    	                              html += '<img src="beer_mug_finish.jpg" alt="" name="beer_mug" width="50" height="50">';
    	                        }
    	                        $('#div_show').text('You have rated ' + movie_title_s).
    	                              append(html).show('fast');
    	                  },
    	                  error: function() {
    	                        $('#div_show').text('There is a problem').show('fast');
    	                  }
    	            });
    	      });
    	});
    
    	</script>
    	<?php
    
    	echo "<form id='add-rating'>";
    	  echo "<input type='radio' name='MOVIE_RATING' value='1' > 1";
    	  echo "<input type='radio' name='MOVIE_RATING' value='2' > 2";
    	  echo "<input type='radio' name='MOVIE_RATING' value='3' checked='yes'> 3";
    	  echo "<input type='radio' name='MOVIE_RATING' value='4' > 4 ";
    	  echo "<input type='radio' name='MOVIE_RATING' value='5' > 5 <br>";
    	  echo "<input type='hidden' name='MOVIE_ID' value='<?php echo $id; ?>'>";
    	  echo "<input type='hidden' name='MOVIE_TITLE' value='<?php echo stripslashes($title); ?>'>";
    	  echo "<input type='hidden' name='USER_ID' value='<?php echo $loggedinusername; ?>'>";
    	echo "<input type='submit' value='Rate'>";
    	echo "</form>";
    	echo "<div id='div_show' class='rulesub' align='left'>";
    	echo "</div>";
    	}
    	echo "<div id='to_play'>"; 
    
    if($rank>=1){
    include"scripts/connect.php" ;
    mysql_connect('localhost',$username,$password);
    @mysql_select_db($database) or die( "Unable to select database");
    $query_to_play = mysql_query("SELECT * FROM to_watch WHERE (to_watch_movie_id='$title') AND (to_watch_user_id='$loggedinusername')");
    
    if(mysql_num_rows($query_to_play) > 0)
    {
    	$user_to_play = mysql_result($query_to_play,$i,"to_watch_user_id");
    		echo "<div><span class='rulesub'>This is in your to play list</span><br></div>";
    }
    else if($rank>=1)
    {
    	include"scripts/connect.php" ;
    	mysql_connect('localhost',$username,$password);
    	@mysql_select_db($database) or die( "Unable to select database");
    	$userquery_in_rating = mysql_query("SELECT * FROM rateing WHERE (title='$title') AND (user_id='$loggedinusername')");
    
    		if (mysql_num_rows($userquery_in_rating) > 0) 
    		{
    			$user_in_rating = mysql_result($userquery_in_rating,$i,"to_watch_id");
    			echo "<div><span class='rulesub'>You have rated this movie</span><br></div>";
    		}
    }
    else 
    {
    ?>				
    	<script type='text/javascript'>
    		$(function() {
    		     $('#to-watch').submit(function(event) {
    		            event.preventDefault()
    		            $(this).hide('fast');
    		            var movie_id_watch = $('#to-watch [name="MOVIE_ID_TO_WATCH"]').val();
    		            var user_id_watch = $('#to-watch [name="USER_ID_TO_WATCH"]').val();
    		            $.ajax({type: 'POST', url: 'to_play_add.php', cache: false, timeout: 10000,
    		                  data: {to_watch_user_id: user_id_watch, to_watch_movie_id: movie_id_watch},
    		                  success: function() {
    		                        $('#div_show_play').text('Added to your to play list').
    		                              append(html).show('fast');
    		                  },
    		                  error: function() {
    		                        $('#div_show_play').text('There is a problem').show('fast');
    		                  }
    		            });
    		      });
    		});
    
    	</script>
    
    <?php		echo "<form id='to-watch'>";
    	  echo "<input type='hidden' name='MOVIE_ID_TO_WATCH' value='<?php echo $title; ?>'>";
    	  echo "<input type='hidden' name='USER_ID_TO_WATCH' value='<?php echo $loggedinusername; ?>'>";
    	echo "<input type='submit' value='Add to my to play list'>";
    	echo "</form>";
    	echo "<div id='div_show_play' class='rulesub' align='left'>";
    	echo "</div>";
    }
    }
    ?>
    
    </div>
    <?php
    }
    ?>
    
    </div>
    

  9. Thanks for that, thought I had that in there. Fixed that problem which brings up another. When the movie is not in the rateing table its suppose to show the button in the last else but it is not doing that.

     

    Here is what I have now.

     

    <div id="to_play"> 
    <?php
    if($rank>=1){
    include"scripts/connect.php" ;
    mysql_connect('localhost',$username,$password);
    @mysql_select_db($database) or die( "Unable to select database");
    $userquery_to_play = mysql_query("SELECT * FROM to_watch WHERE (to_watch_movie_id='$title') AND (to_watch_user_id='$loggedinusername')");
    
    if (mysql_num_rows($userquery_to_play) > 0) {
    
    $user_to_play = mysql_result($userquery_to_play,$i,"to_watch_user_id");
    ?>
    
    <div><span class="rulesub">This is in your to play list</span><br></div>
    <?php
    
    }
    else if($rank>=1){
    include"scripts/connect.php" ;
    mysql_connect('localhost',$username,$password);
    @mysql_select_db($database) or die( "Unable to select database");
    $userquery_in_rating = mysql_query("SELECT * FROM rateing WHERE (title='$title') AND (user_id='$loggedinusername')");
    
    if (mysql_num_rows($userquery_in_rating) > 0) {
    
    $user_in_rating = mysql_result($userquery_in_rating,$i,"to_watch_id");
    			?>
    
    <div><span class="rulesub">You have rated this movie</span><br></div>
    <?php
    			}
    	}
    	else {
    			?>
    	<script type="text/javascript">
    
    $(function() {
         $('#to-watch').submit(function(event) {
                event.preventDefault()
                $(this).hide('fast');
                var movie_id_watch = $('#to-watch [name="MOVIE_ID_TO_WATCH"]').val();
                var user_id_watch = $('#to-watch [name="USER_ID_TO_WATCH"]').val();
                $.ajax({type: 'POST', url: 'to_play_add.php', cache: false, timeout: 10000,
                      data: {to_watch_user_id: user_id_watch, to_watch_movie_id: movie_id_watch},
                      success: function() {
                            $('#div_show_play').text('Added to your to play list').
                                  append(html).show('fast');
                      },
                      error: function() {
                            $('#div_show_play').text('There is a problem').show('fast');
                      }
                });
          });
    });
    
    </script>
    <form id="to-watch">
      <input type="hidden" name="MOVIE_ID_TO_WATCH" value="<?php echo $title; ?>">
      <input type="hidden" name="USER_ID_TO_WATCH" value="<?php echo $loggedinusername; ?>">
    <input type="submit" value="Add to my to play list">
    </form>
    <div id="div_show_play" class="rulesub" align="left">
    </div>
    

  10. I am attempting to i have an if else statement that looks at 2 different things and if both are false then do something else. I am getting a

    Parse error: syntax error, unexpected T_ELSE in /home/drinktot/public_html/rules_main_test.php on line 173
    I will note line 173 in the code

     

    IE. look into one table to see if there is a match, if there's not look in a different table for a match. If none is found there then post a button.

     

    I have been playing with this for a while now and I don't think I'm really seeing anything anymore, and its all blending together.

     

    <div id="to_play"> 
    <?php
    if($rank>=1){
    include"scripts/connect.php" ;
    mysql_connect('localhost',$username,$password);
    @mysql_select_db($database) or die( "Unable to select database");
    $userquery_to_play = mysql_query("SELECT * FROM to_watch WHERE (to_watch_movie_id='$title') AND (to_watch_user_id='$loggedinusername')");
    
    if (mysql_num_rows($userquery_to_play) > 0) {
    
    $user_to_play = mysql_result($userquery_to_play,$i,"to_watch_id");
    ?>
    
    <div><span class="rulesub">This is in your to play list</span><br></div>
    <?php
    				}
    	else{
    include"scripts/connect.php" ;
    mysql_connect('localhost',$username,$password);
    @mysql_select_db($database) or die( "Unable to select database");
    $userquery_in_rating = mysql_query("SELECT * FROM rateing WHERE (title='$title') AND (user_id='$loggedinusername')");
    
    if (mysql_num_rows($userquery_in_rating) > 0) {
    
    $user_in_rating = mysql_result($userquery_in_rating,$i,"to_watch_id");
    			?>
    
    <div><span class="rulesub">You have rated this movie</span><br></div>
    <?php
    ****this is line 173	}
    	}
    	else {
    			?>
    	<script type="text/javascript">
    
    $(function() {
         $('#to-watch').submit(function(event) {
                event.preventDefault()
                $(this).hide('fast');
                var movie_id_watch = $('#to-watch [name="MOVIE_ID_TO_WATCH"]').val();
                var user_id_watch = $('#to-watch [name="USER_ID_TO_WATCH"]').val();
                $.ajax({type: 'POST', url: 'to_play_add.php', cache: false, timeout: 10000,
                      data: {to_watch_user_id: user_id_watch, to_watch_movie_id: movie_id_watch},
                      success: function() {
                            $('#div_show_play').text('Added to your to play list').
                                  append(html).show('fast');
                      },
                      error: function() {
                            $('#div_show_play').text('There is a problem').show('fast');
                      }
                });
          });
    });
    
    </script>
    <form id="to-watch">
      <input type="hidden" name="MOVIE_ID_TO_WATCH" value="<?php echo $title; ?>">
      <input type="hidden" name="USER_ID_TO_WATCH" value="<?php echo $loggedinusername; ?>">
    <input type="submit" value="Add to my to play list">
    </form>
    <div id="div_show_play" class="rulesub" align="left">
    </div>
    
    <?php
    }
    }
    ?>
    
    </div>

     

    Thank you

     

  11. I rather liked the look and feel. Very simple and does what it says its going to do with out all the bull. The only thing I might change is after you look up a domain and you have the facebook, google+ and what not at the bottom, I would leave a little bit of empty space. Just my 2 cents

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