Jump to content

podja

Members
  • Posts

    57
  • Joined

  • Last visited

    Never

Everything posted by podja

  1. podja

    CSS Buttons

    Hi, I am working on a photography portfolio for a friend and have made the simple layout. http://sam.jackday.co.uk/ When you rollover the CSS buttons on the bottom left, only the text background changes and not the whole button. How can I change this so the whole button changes colour and not just the text? Here's the relevant CSS code: #container ul#nav { float: left; width: 120px; padding: 0px; text-align: right; margin-top: 420px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; } #container ul li { background-color: #38322C; font-family: Arial, Helvetica, sans-serif; list-style-type: none; width: 100px; margin-top: 10px; padding-top: 10px; padding-right: 0px; padding-bottom: 10px; padding-left: 10px; } #container ul li a { color: #FFFFFF; text-decoration: none; font-weight: bold; text-transform: lowercase; padding: 10px; } #container ul li a:hover { background-color: #003366; width: 100px; } and the HTML code if needed: <ul id="nav"> <li><a href="#">News</a></li> <li><a href="#">About Me</a></li> <li><a href="#">Portfolio</a></li> <li><a href="#">Contact</a></li> </ul>
  2. And how do I got about this? Just have links to each different variable?
  3. I am still not to sure. Relies on the $_GET variable because no other content is shown without it.
  4. Hi, Well this is mainly SEO but PHP is involved. I need a sitemap for search engines to crawl my site. I have dynamic data on my site so in my sitemap would I just need the one page or a page for every bit of different content. E.g: Sitemap 1 index.php videos.php videoplayer.php links.php Sitemap 2 index.php index.php?archive=jan index.php?archive=feb index.php?archive=mar videos.php videos.php?archive=jan videos.php?archive=feb videplayer.php?videoid=1 videoplayer.php?videoid=2 Do you understand? Thanks
  5. Hi, I know there is something you can do in the .htaccess file that redirects all traffic from 1 url to another. For example: http://google.com/ would redirect to http://www.google.com/ It helps with SEO I think because backlinks are all classed as one site. Thats what I read somewhere anyway.
  6. Hi, I have a login script which sets 2 cookies: setcookie('username', "$user", time()+60*60*24*30, "/", ".ilkleysb.com", 0); setcookie('password', "$pass", time()+60*60*24*30, "/", ".ilkleysb.com", 0); I then have a logout script that is meant to delete the cookies: setcookie('username','',1); setcookie('password','',1); header("location:index.php"); The cookie doesnt seem to get deleted though. Any help would be appreciated! Thanks.
  7. Hi, This is the code I am using but it doesn't seem to be working: <input name="name" type="text" value="<?php if(isset($name)) { echo $name; } ?>" /> Please correct me.
  8. Ah thanks. I had the column name messed up.
  9. Hi, I am making a video page on my site: http://ilkleysb.com/v3/videoplayer.php?videoid=6 This works fine, but I want to have a comments system on here to. I added the form like normal but when submit is pressed I get the mysql_fetch_array error shown below: Here is the code I am using: <?php $videoid = $_GET['videoid']; include('connect.php'); $query = "SELECT * FROM `video` WHERE `id` = '$videoid'"; ?> <!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><?php echo $videotitle; ?></title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="container"> <h1>Ilkley Skateboarding - News</h1> <?php include('navigation.php'); ?> <div id="content"> <?php $result = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($result)) { $title = $row['title']; $description = $row['description']; $videourl = $row['videourl']; $starring = $row['starring']; $filmedby = $row['filmedby']; $editedby = $row['editedby']; $filesize = $row['filesize']; $cameraused = $row['cameraused']; $youtube = $row['youtube']; $mp4 = $row['mp4']; $date = $row['date']; $postedby = $row['postedby']; if(strlen($youtube)>10) { $youtube1 = "<a href='$youtube' target='_blank'>YouTube</a>"; } else { $youtube1 = ""; } if(strlen($mp4)>10) { $mp41 = "<a href='$mp4' target='_blank'>.MP4 (right click then save as)</a>"; } else { $mp41 = ""; } ?> <div class="post"> <h2><?php echo $title; ?></h2> <embed src="<?php echo $videourl; ?>" width="320" height="256" pluginspage="http://www.apple.com/" border="0"></embed> <ul id="videodetails"> <li><strong>Title: </strong><?php echo $title; ?></li> <li><strong>Starring: </strong><?php echo $starring; ?></li> <li><strong>Filmed By: </strong><?php echo $filmedby; ?></li> <li><strong>Edited By: </strong><?php echo $editedby; ?></li> <li><strong>Camera Used: </strong><?php echo $cameraused; ?></li> <li><strong>Filesize: </strong><?php echo $filesize; ?></li> <li><strong>Other Formats: </strong><?php echo "$youtube1 $mp41"; ?></li> </ul> </div> <div class="post" id="comments"> <h3>Comments</h3> </div> <div class="post" id="leavecomment"> <h3>Leave a Comment</h3> <fieldset> <form id="form1" name="form1" method="post" action=""> <label for="name">Name:</label><br /> <input type="text" name="name" /><br /> <label for="name">Email:</label><br /> <input type="text" name="email" /><br /> <label for="name">Comments:</label><br /> <textarea name="comments" rows="4"></textarea><br /> <input type="submit" name="submit" value="Submit" id="button" /> </form> <?php if(isset($_POST['submit'])) { include('connect.php'); $name1 = $_POST['name']; $email1 = $_POST['email']; $comments1 = $_POST['comments']; $name1 = strip_tags($name); $email1 = strip_tags($email); $comments1 = strip_tags($comments); $date1 = date("m/d/y"); $query = "INSERT INTO `videocomments` (`name`, `email`, `comments`, `date`, `videoid`) VALUES ('$name1', '$email1', '$comments1', '$date1', '$videoid1')"; $result = mysql_query($query); echo "Thanks!"; } ?> </fieldset> </div> <?php } ?> </div> <div id="footer"> <p>Copyright © 2008 Ilkley SB | <a href="admin-home.php">Login</a></p> </div> </div> </body> </html>
  10. Heres an example table: id | Content | Month 1 | Content 1 | January 2008 2 | Content 1 | January 2008 3 | Content 2 | Febuary 2008 4 | Content 3 | Febuary 2008 5 | Content 4 | Febuary 2008 6 | Content 5 | March 2008 7 | Content 6 | March 2008 1 | Content 7 | April 2008 As you can see, there are 4 months, so I want only those 4 months displayed in the drop down list. However months like Febuary and March are displayed more than once and when I echo'd the values out the months appeared twice rather than once in the drop down list. Thanks.
  11. Hi, I have started to code a CMS system for my new site. All the content is getting saved in a database to make it easy to update. I want to have a drop down list that displays the months that have content, allowing you to click the month and be redirected to a page showing just content from that month. How do I check the database to get the months into a drop down box? The thing I am mainly struggling is just to get each month to display once. Thanks in advance.
  12. Anyone? I know your all geniuses Someone must have an answer!
  13. O must have deleted that by mistake. That has nothing to do with the file upload at this point though.
  14. You can access databases remotely I think. There is an option in the new cPanel
  15. Hey, I have been trying to integrate a file upload script into a script that inserts stuff into the database. I've been trying all day and don't see why it wont work. It works fine by itself, but when added to the other script it wont work. Heres the full script I'm using (Its a bit long but I'm sure you can help!) Heres the form I am using: <!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> </head> <body> <h1>Update FunVid.net</h1> <p>Fill in the forms below to update FunVid.net</p> <?php if(isset($_POST['submit'])) { include('insert.php'); } ?> <fieldset> <form name="update01" method="post" enctype="multipart/form-data"> <label for="title">Title:</label><br /> <input type="text" name="title" id="title" tabindex="1" value="<?php if(isset($title)) {echo $title;} ?>" /><br /> <label for="desc">Video Description</label><br /> <textarea name="desc" id="desc" rows="10" cols="100" tabindex="2"><?php if(isset($desc)) {echo $desc;} ?></textarea><br /> <label for="embed">YouTube Embed Code (Will be validated)</label><br /> <textarea name="embed" id="embed" rows="10" cols="100" tabindex="3"><?php if(isset($embed)) {echo $embed;} ?></textarea><br /> <label for="img">Image To Upload</label><br /> <input type="file" name="imgfile" id="imgfile" tabindex="4" /> <br /> <input type="submit" name="submit" id="submit" value="Update FunVid.net!" /> </form> </fieldset> </body> </html> And heres the PHP I am using: <?php // Insert Code | Code To Insert Stuff Into Database include('connect.php'); // Get The Values From The Form $title = $_POST['title']; $desc = $_POST['desc']; $embed = $_POST['embed']; $embed = stripslashes($embed); $date = date("d/m/y"); // Image Upload Variable // Create matches array for Youtube ccde validator $matches = array(); // create the errors array $errors = array(); // Validate the title input if(strlen($title) < 5) { $errors[] = 'Your Title Needs To Be A Bit Longer Than That!'; } // Validate the description input if(strlen($desc) < 20) { $errors[] = 'Your Description Needs To Be A Bit Longer Than That!'; } // Validate the embed input if(strlen($embed) < 30) { $errors[] = 'You Need To Embed Your YouTube Video!'; } // If no errors if(empty($errors)) { // The code to validate youtube input $i = strpos($input,'youtube.com/v/'); $length = strlen('youtube.com/v/'); while ( $i !== FALSE) { $l = strpos($input,'"',$i); if ($l !== FALSE) { $matches[] = substr($input,$i+$length,$l-$i-$length); } $i = strpos($input,'youtube.com/v/',$l); } $moviecode = $matches[0]; $embed = "<object type=\"application/x-shockwave-flash\" data=\"http://www.youtube.com/v/$moviecode\" width=\"425\" height=\"350\"><param name=\"movie\" value=\"http://www.youtube.com/v/$moviecode\" /></object>"; $uploadpath = "uploads/"; $uploadpath = $uploadpath . basename( $_FILES['imgfile']['name']); move_uploaded_file($_FILES['imgfile']['tmp_name'], $uploadpath); $query = "INSERT INTO `updates` (`title`, `desc`, `embed`, `img`, `date`) VALUES ('$title', '$desc', '$embed', '$img', '$date')"; $exe = mysql_query($query); } else { foreach($errors as $error) { echo "<p class=\"errors\">$error</p>"; } } ?> I dont get any errors and everything inserts into the database fine. Its just the image wont upload. Cheers. P.S - I have definately set the permissions to 777 before you ask, hehe.
  16. Hey, You may or may not know that the Youtube embed code that YouTube provides is not valid. This tool makes the code valid. http://www.griptapethumb.com/tools/youtube/index.php See if it works. Thanks.
  17. That worked kathas, its just it ends up with a slash on the end. And ideas how to get rid of that? My code is: <?php if(isset($_POST['submit'])) { $input = $_POST['input']; $matches = array(); // will hold the matched random chars $i = strpos($input,'youtube.com/v/'); $length = strlen('youtube.com/v/'); while ( $i !== FALSE) { $l = strpos($input,'"',$i); if ($l !== FALSE) { $matches[] = substr($input,$i+$length,$l-$i-$length); } $i = strpos($input,'youtube.com/v/',$l); } echo "<br>"; echo $matches[1]; } ?>
  18. Could you me an example of how this would work, because the script only knows to look for http://www.youtube.com/v/ - then it needs to find the characters after that to.
  19. Hey, I am working on a script and I need to find something from some code. E.g. This code is inputted: I want to locate http://www.youtube.com/v/ then find all the characters after that. So in this case it would return Zi_760pnGtg If you need it explaining more, just say so! Thanks.
  20. Ok thanks. I'll take that into consideration. I'm probably going to keep the design, but will change the index page. And for the quote, I havnt coded that yet, I'll try get it done soon
  21. Cheers, I also changed the links to red. What do you think now?
  22. Cheers, Ill experiment with the red. And with the news page, I tried to get the blog kind of feel. And thought there wasnt enough space when it was thin. But I'll consider changing it. P.S - I am looking to exchange links if anybody is interested.
×
×
  • 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.