Jump to content

jayjay960

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Everything posted by jayjay960

  1. If you were to control your sessions through one page, then include that page wherever you need to use sessions, they would work.
  2. Well, no, we can't tell you the correct path to the font, because we don't know where you've put it. Where is it?
  3. Does CentOS have a package manager like apt? Have a look there if there's anything you need.
  4. So, I need a table to look like this: ############# # # # ############# # # # ############# # # ############# Now just using plain html, that would be easy enough to do, just adding colspan="2" to the last cell, however, I'm using css tables, as in, this is what my table looks like: <style> .table { display: table; } .tr { display: table-row; } .td { display: table-cell; } </style> <div class="table"> <div class="tr"><div class="td">Cell 1</div><div class="td">Cell 2</div></div> <div class="tr"><div class="td">Cell 3</div><div class="td">Cell 4</div></div> <div class="tr"><div class="td">Cell 5</div></div> </div> Now, what I want to know is if there is a CSS equivalent to colspan that lets one cell take up more room. I've tried just setting width: 100%;, and using the html colspan="2" but neither work. I have the CSS2 specification pdf which is helpful, but I haven't been able to find any answers in there. Can anyone help?
  5. Try: /\b<script>parent.doneLoaded('{"meta":[{"request":"DEPARTMENTS","skip":"false","campusActive":"true","progActive":"true","termActive":"true","size":"\b.+\b"}],"data":[{\b/
  6. Well thanks for that amazingly detailed and explanatory post (not just copying and pasting the title, and asking an actual question would be nice), but you need css for that. a:active { /*css*/ } a#id { /*css*/ }
  7. Do you mean to escape it so it's treated like a normal character? \% The backslash is used to escape characters in most programming languages (eg echo 'abc\'def'; in PHP will show as abc'def )
  8. <?php $C = 0; while($C <= 4){ $drawing = rand(1, 99); $drawings[$C] = $drawing; for ($n = 0; $n <= $C; $n++) { if ($drawing==$drawings[$n]) { while ($drawing==$drawings[$n]) { $drawing = rand(1, 99); $drawings[$C] = $drawing; } } } echo ''.$drawing.'.'; $C++; } ?> There, I think that should work
  9. ..What are you talking about? md5('2193123456MelissaP201.50CD19713AID949') does return 4932e7c909fbaccea61eab714f71d67a. You need to be more specific. Show us your code.
  10. Hmm. When you say they show on the page, do you mean the names of the images show or the actual images will show on the page?
  11. Do you mean you want something that checks if the field has anything in it? if (document.getElementById('quote').value.length>0) { var el = document.getElementById('quote'); } else { var el = document.getElementById('author'); }
  12. The better way to do that would be: <?php $left_title = stripslashes($_POST['left_title']); $left_text = stripslashes($_POST['left_text']); $images[1] = $_FILES['image1']['tmp_name']; $image1main = $_FILES['image1']['name']; //image 1 $src = imagecreatefromjpeg($images[1]); $images[2] = $_FILES['image2']['tmp_name']; $image2main = $_FILES['image2']['name']; // image 2 $src2 = imagecreatefromjpeg($images[2]); $images[3] = $_FILES['image3']['tmp_name']; $image3main = $_FILES['image3']['name']; // image 3 $src3 = imagecreatefromjpeg($images[3]); for ($n = 1; $n <= $number_of_images_uploaded; $n++) { list($width,$height)=getimagesize($images[$n]); $newwidth=600; $newheight=($height/$width)*$newwidth; $tmp=imagecreatetruecolor($newwidth,$newheight); imagecopyresampled($tmp,$src,0,0,0,0,$newwidth,$newheight,$width,$height); $filename = "/home/users/web/b2075/moo.petenaylor/websites/d/dogs/images/front/". $_FILES['image'.$n]['name']; imagejpeg($tmp,$filename,100); imagedestroy($src); imagedestroy($tmp); } // Validation //saving record to MySQL database //(\"$item_category\",\"$title\",\"$description\",\"$price\",\"$postage\",\"$condition\",\"$item_code\",\"$image1main\",\"$image2main\",\"$image3main\",\"$image4main\")" ; @$pfw_strQuery = "INSERT INTO `front_page_text`(`left_title`,`left_text`,`image1`,`image2`,`image3`)VALUES (\"$left_title\",\"$left_text\",\"$image1main\",\"$image2main\",\"$image3main\")" ; ?> That should work. assuming $number_of_images_uploaded contains (surprise surprise!) the number of images that were uploaded. Also I replaced $image1, $image2 and $image3 with one array $images.
  13. What exactly are you expecting it to do when you click on it?
  14. session_set_cookie_params() has to come before session_start()
  15. Try changing setTimeout("cycle()", 5000); to timeout = setTimeout("cycle()", 5000); Then to reset it you should be able to do: clearTimeout(timeout); timeout = setTimeout("cycle()", 5000);
  16. Ok, this is driving me insane. Here is a script that runs at the start of each page (before any html): <?php $rememberme = false; if (isset($_POST['rememberme'])) { $rememberme = true; $logintime = time(); } if ($rememberme || isset($_SESSION['rememberme'])) { session_set_cookie_params($_SESSION['logintime']+(60*60*24*30)); } session_start(); if ($rememberme) { $_SESSION['rememberme'] = true; } ?> What I'm trying to do is have it so that when you login and have checked the checkbox named 'rememberme', the session cookie lasts for 30 days. Currently, if you log in without checking the box the cookie will expire at the end of the session as normal, however, if you tick the remember me box, the exact same thing happens. No expiry date. What's annoying me is that if I put session_set_cookie_params(60*60*24*30); directly before session_start();, it works fine and the cookie has an expiry date, but once I try to check if the user chose remember me, it stops working. The first thing I tried was simply: [code]<?php if (isset($_POST['rememberme'])) { session_set_cookie_params(60*60*24*30); } session_start(); ?> But that didn't work, and since then I've tried every possible way of doing this I could think of, including destroying the session cookie before setting the cookie params, and even just setcookie('PHPSESSID', session_id(), '', 60*60*24*30);, and I've had different results each time, including (from the look of it) my $_SESSION variables being reset, being able to log in without checking the box but not with, and getting errors from session_start() that say my headers have already been sent. I would really, really appreciate help with this, it's driving me insane..
  17. You need to run the page through a web server with PHP installed. If you don't have access to one then there are plenty of free web hosts around.
  18. Wait, do you want a form to submit as soon as the page loads? You'd need javascript for that: document.getElementById('form id here').submit(); I'm sure there's a much better way of doing what you want to accomplish with redirecting, but you'll have to be more clear about what you're trying to do.
  19. We'll need the whole script, that line tells us nothing. You would want it to go to ?page=flights&from=Atlanta#to. If you select the city using a dropdown box, it most likely uses a form with the method GET, in which case all you would need to do is add a hidden input element to that form like so: <input type="hidden" name="page" value="flights" />
  20. Ah yes I forgot about that.. Thanks, I'll fix that hole up.
  21. This isn't possible with php, php is a server-side language which means everything is processed and parsed on the server and the client just gets the page that comes out the other end. if you wanted to just use php you would have to reload the page. Also, yes you would probably get shot and die a most painful death if you used an iframe, but you could also try ajax. That uses javascript to load a page and then you could put the results in a div or something.
  22. If you're going to be doing advanced-ish stuff like this (involving mysql anyway), you should probably learn html and css for designing web pages. wysiwyg editors like dreamweaver usually add a lot of unnecessary code, plus you don't have as much control. www.w3schools.com have some html and css tutorials, or it might even be worth taking out a book on html from your library.
  23. Hopefully you know about editing themes in Joomla because I haven't got a clue, but if you do, you can use z-index to set the depth of elements. e.g. <div style="z-index: 1;" /> will show below <div style="z-index: 2;" />
  24. I haven't seen the second one before.. I don't like the idea of having to switch to doing it that way. It seems a bit unnecessary.
×
×
  • 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.