Jump to content
Old threads will finally start getting archived ×
🚨🚨 GAME-CHANGING ANNOUNCEMENT FROM PHP FREAKS 🚨🚨 ×

Copilot 🤖

Members
  • Posts

    157
  • Joined

  • Last visited

Everything posted by Copilot 🤖

  1. Hey, I'm new to using mod_rewrite, I have two url's I currently want to make more SEO friendly: 1) http://domain.com/dir/index.php?p=list&d=all 2) http://domain.com/dir/index.php?p=list&d=cat&c=2 I want these to turn into: 1) http://domain.com/list/all/ 2) http://domain.com/list/cat/2/ Currently my .htaccess looks like this: Options +FollowSymLinks RewriteEngine on RewriteRule (.*)/(.*)/(.*)/ index.php?p=$1&d=$2&c=$3 [L] RewriteRule (.*)/(.*)/ index.php?p=$1&d=$2 [L] Now the rewrite itself works, however all my images and css have disappeared? I'd appreciate it if anyone could help? Kind Regards, Sean
  2. I have 2 images which will be used as a forward and backward arrow, however I don't know how to make them change the image. heres my Javascript: slideshow.js http://pastebin.com/m2d7c15c4 Javascript code to show slideshow <script type="text/javascript"> //new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder) new fadeshow(fadeimages, 511, 205, 0, 3000, 1, "") </script>
  3. Hello, thanks in advance for checking this out. I have recently updated my design with this awesome client login dropdown, saldy it doesnt alight with the rest of the page in IE7, its fine in FF, Google and IE8, but in IE7 it makes the page width massive... Preview: http://alturl.com/f9ys - as you can see the top bar which has a tab saying "client login" slips off the page to the right in IE7. HTML Code: http://pastebin.com/d4174d06f slide.css: http://pastebin.com/m1b1e2f62 style.css: http://pastebin.com/m22978c5a Thanks for a BIG help in the past, please help me again Sean
  4. ok, nice, which one should I do first, order it then limit? sean
  5. anyone? I thought this would eb an easy fix, but I can't find anything anywhere.
  6. Hello. How do I do a mysql query to return the top 10 results ordered by points. For example my database looks like this: User | Points 1 | 10 2 | 45 3 | 0 4 | 10 5 | 45 6 | 0 7 | 10 8 | 45 9 | 0 So i basically want a leaderboard showing the top 10 users. Cheers Sean
  7. It sent before, and now not, lol. I have looked over it multiple times but can't see anything wrong??? http://pastebin.com/m24f4c2ac thanks again sean
  8. Thats awesome. you guys are amazing! Thanks all, have a good XMAS! Cheers Sean
  9. Ok, well my problem is that I have a link which goes to for example http://mysite.com/index.php?page=listing&id=1 Now, The PAGE variable sets what the page is, simple. Then the ID variable tells the included PAGE what content to include corrisponding to the ID. I have a problem with the second part, the PAGE is included, but then the included page does not see the ID variable. Heres some of my code: Bit that includes the page <?php //display main content $pagesavail = array ('home','moto','freetemp','freetempshow'); $var1 = sanitize($_GET['oc']); if (in_array($var1, $pagesavail)) { include("http://mysite.com/include/".$var1.".php"); } else { include("http://mysite.com/include/home.php"); } ?> Bit that includes the content based on ID <?php echo ("-".$_GET['id']."-<br>"); //Just to test ?> As you can see from the code above the included page should display -1- (if the ID variable was set to 1), Though im seeing -- Cheers Sean
  10. Thanks man! Works like a charm. Have a good XMAS!
  11. Hi. Ok, well Im getting this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc) VALUES ('NULL','hi','yes','5','whc493ad286a3f2f.jpg','whc493ad286a4039.jpg' at line 1 My code is this: //upload image $newname = uniqid("whc").".jpg"; move_uploaded_file($_FILES['image_thum']['tmp_name'], "../images/templates/$newname"); //upload image $newname2 = uniqid("whc").".jpg"; move_uploaded_file($_FILES['full_image']['tmp_name'], "../images/templates/$newname2"); mysql_connect(*********,*********,*********) or die(mysql_error()); mysql_select_db(*********) or die(mysql_error()); $name = $_POST['name']; $members = $_POST['members']; $cat = $_POST['cat']; $desc = $_POST['desc_main']; // Insert a row of information into the table mysql_query(" INSERT INTO templates (id, name, members, cat, image_thum, full_image, desc) VALUES ('NULL','$name','$members','$cat','$newname','$newname2','$desc') ") or die(mysql_error()); echo "complete"; Cheers Sean
  12. Fixed! thanks anyway
  13. Hello, Im having a small problem. These 2 boxes you see in the picture below should be aligned though there is a 20px gap above the green one (it should be where the line is). Pic http://i37.tinypic.com/2vbq4i9.png Css Code http://pastebin.com/m7a93dd68 HTML code http://pastebin.com/m3b80f4d7 This is urgent so $5 via PayPal for helper. Thanks in advance! Sean
  14. oh, lol, I was messing around with it and after a few hours, Sorted thanks anyway guys.
  15. nope, the float thing does not work.... Link: FIXED Thanks for your help
  16. Should I just start again with coding the design, lol?
  17. UPDATED! HTML: http://pastebin.com/m28096b1 CSS: http://pastebin.com/m4f52814c Thanks for your help, and float right does not work as the grey box then goes to the right, I want to keep it on the left but just up so its inline with the form.
  18. ok, I have a small problem, I have 2 coloumns, one for an advertisment and one for content Screen: http://i34.tinypic.com/71jihu.png ok, As you can see in the screenshot there is a grey box with the word 'hi' in it that needs to come up inline with the form. here is my css code for the box: #featured { float:left; width:200px; background-color:#666666; } Thanks in advance Sean UPDATED! HTML: http://pastebin.com/m28096b1 CSS: http://pastebin.com/m4f52814c
  19. yep, im allowing them access to the database
  20. nope, username and password are 100% correct, I even tried deleting and making a new user account, any more ideas? thanks sean
  21. hi im getting the following error: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'USERNAME'@'localhost' (using password: YES) in /home/USERNAME/public_html/DIRECTORY/DIRECTORY/reg_pro.php on line 181 Access denied for user 'USERNAME'@'localhost' (using password: YES) ok, Usually I would think, ok it means there login is not correct, but it was all working before I set them up as variables and include config.php. heres my code: re_pro.php // Make a MySQL Connection mysql_connect($host,$username,$password) or die(mysql_error()); mysql_select_db($database) or die(mysql_error()); config.php $host = ("localhost"); //Host for all databases $database = ("DATABASE"); //database containing all tables $username = ("USERNAME"); //username to access the database $password = ("PASSWORD"); //password for the above user Thanks in advance. Sean
  22. ok, thanks foir reply, sadly im still getting 404 Page when I goto /owners/reg when I have a page at index.php?ty=owners&oc=reg My code: Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteRule ^([a-z])/([a-z])/ /index.php?ty=$1&oc=$2 Thanks Sean
×
×
  • 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.