Jump to content

Ninjakreborn

Members
  • Posts

    3,922
  • Joined

  • Last visited

Everything posted by Ninjakreborn

  1. Sorry about that, I was thinking about starting to use the rename function and was wondering about it, but I decided not to use that, but to use something else.
  2. I have 30 file's I allow to be uploaded at a time on one project <label for="file1">Image 1</label> <input name="file1" id="file1" type="file" /><br /> that is what each one looks like just with a different number on the other page I am testing for the upload with if (isset($_POST['file1'])) { // file was uploaded }
  3. So in it's basic form, I can do this with a file if (isset($_POST['file1'])) { $newname = "Some system to rename file's"; rename ($_FILES['file1']['tmp_name'], $newname); move_uploaded_file($newname, "path"); } something along those line's for just renaming a file that just got uploaded, then moving it to the proper directory.
  4. I need something I can do from php specifically, because some places I don't have htaccess capabilities.
  5. I was wondering why this wasn't working [code]<?php $expression = "^[0-9].[0-9]$"; if (!ereg($expression, $_POST['price1'])) { // if it is check it's format with regex   $errorhandler .= "Price 1 has to be formatted like 0.00 and it is not.<br />"; } ?>[/code] The regular expression was suppose to check for 0-9 at the beginning.  THen look for a "." then another number set between 0-9 at the end. Because ^ means at the beginning and $ means at the end, but it's not working, it's returning false even when it'se suppose to return true.
  6. ah it will. I didn't know that.  Thank you, so it will overwrite it from a populated array, to an empty array. Thanks thorpe
  7. Have session_start(); at the start of each page with no spaces at the top <?php session_start(); ?> copy and paste that code at the very, very, very top of the page.
  8. I know, how do you destroy a session array? as above?
  9. I wanted to always make those damn magic quote's off I did this in my config file, ini_set("magic_quotes_gpc", 0); that has been there, but I just noticed, it was running addslashes for some reason.  I didn't even use mysql real escape string but it was addingslashes to it anyway, and I am having to stripslashes, I was just wanting to remove those but it's not working ini_set("magic_quotes_gpc", 0); that is what I used?
  10. I have a login session. I am also creating a temporary session array $_SESSION['temp']['variable'] = "value"; there are a lot of them, but I need to destroy them at a specific point, the entire array need's the be "cleansed" at a specific point, without removing any other sessions but the one's in that array. I would think session_destroy($_SESSION['temp']); would remove the entire array but it only takes 0 parameters.  So that can't happen. For now how do I just destroy that one session array.
  11. Ok, well I had another problem getting 2 div's the same height. When I foudn out the name was equal height div's I found ton's of informaiton on it.  For this what would I search for to find info on this specific technique. Thanks for all the help.
  12. Just wondering, about this min-height hack If I use this, if the content goes down more than that height, will it expand the height of the div to match the content, as needed.
  13. Ok the min height thing will work, thanks. Can you explain [quote]1. There are a couple techniques to this. If you have your "stamped" image with a clean cut transparency, you can often use an absolute positioning to get it in place. Otherwise, you need to actually cut up your image and have the part that "floats" to the top and bottom in separate containing divs lined up to get the effect you want. Keep in mind that with CSS, it is often about perception: What you can make it look like you're doing rather than what you are actually doing.[/quote] A little better, just trying to understand what you meant about part of that.
  14. There are 2 thing's I am wanting to learn how to do. These 2 thing's are both able to be done with CSS but I don't know what to search for, or how to learn how to do these 2 things.  My CSS knowledge has tripled because I read a few book's, things are coming a lot more naturally, layout's that took me day's now take me hour's I am getting a lot better.  Mostly because I have had to code a lot of layout's in the past few days. Techniques I am wondering about. 1. There are banner's like php freaks.  You see the logo inside the banner, there are sometime's odd image's inside the banner, where part of the image stick's out at the top and bottom of the div. For instance there's a div, and the div has a background color, it's a certain height and width.  Then on the left hand side there is a logo, then on the right hand side for instance there might be a star.  but the point's at the top, and bottom, and a little on the right point out, so the star look's stamped onto the banner, but a little out of it, how do you perform this technique. 2. How do you make something a certain height/width without any content. If you have a div, you want to be atleast a specific size, no matter what, it will still getting wider for content, but it is atleast a specific height at all times. min-height, minwidth won't work because it has to be cross browser compatible Any advice on how to do these 2 techniques would be appreciated.
  15. That's right, I only used it once.  I normally don't even use php_self but I started recently. I also didn't mean referer, I was meaning to say request_uri
  16. http://www.hasbadservice.com/template1temp.php There is an image in the header (topright) There is one problem with it though, there is some random white space around the image, I don't understand how it's getting there.  The entire image itself look's perfect, the whole background color of the image is the same as that background color on the div.  But that whitespace still appear's there, it's probably something simple, I tried messing with the margin's and padding's but it's not producing any visible result's except moving around the image but leaving the whitespace, I am sure those whiet area's aren't in the image itself.
  17. I don't.  I was just learning shorthand.  I have been reading a few more book's on css to try and get better and better and it's helping even more.
  18. $_SERVER['HTTP_REFERER'] look it up to make sure, but I think that's it, I don't remember., You see what page you want for instance if you want the homepage to not show up on the homepage then something like if ($_SERVER['HTTP_REFERER'] != "public_html/index.php") { ?> show link <?php } ?> osmething along those line's you may have to echo the server variable on the page's you need to find out what the exact path is going to be.
  19. [code]Of course, like I say, this is vastly over simplifying it, but on the other hand, it doesnt really need to be that complex. I actually learnt a hell of alot from the Code Igniter framework (www.codeigniter.com) and its online manual, as it gave me some excellent ideas for structuring things as well as a bit of an OOP crash course, as it's one of the easier ones to get your head around.[/code] I didn't see that there before, I will download that right now, and start playing with it. I built my basic framework but maybe looking around through that will give me some idea's of what I can add to it, thanks.
  20. Ok server variable referer is very helpful.  it's not meant for what you are trying to do. If you want the username already entered.  Pass the username itself over to a page, and request for a password.  pass the username with that page, and when they get to the processor check to make sure hte password matches there hashed and databased password.  If it does it redirects them to the page or page's they have access to in the database.  Better yet send them a  link to login and just let them login like normal people.  It jsut depend's but using referer for something like that is not very safe.
  21. Very nice, there are a few thing's In my opinion I can point out. 1. The bottom bar, the color could probably be a lot better. 2. That same annoying color can be found throughout the table's when they are highlighted.  The reason I don't like this color ocmbination is because at the bottom you can't see the link's very well, and it's a little hard on the eye's the same for the list of tables you can see. 3. It seem's functionally slow, but it might be my computer.  Maybe you could optimize the coding some. 4. There is a color around the outside of the whole thing, I think a little darker grey would look better.  IT's just a different idea 5.  Most of my idea's would just be messing around with the color's other than blue some, the blue type color is perfect for this type of program.
  22. I need to have a div, I will set width: 100% it will have a height of like 200 px or something, maybe even a little bit bigger/smaller. I am going to have an image in the div, but I need hte div background color to be specific, and the image to be outside of the div, like the top and bottom of the image, will need to be larger than the background image.
  23. I found out what it was. Inside the document root, it traced it to the root folder but left out the root oakley folder. So it left out that so I had to do $docroot . "oakley/master/whatever and it finally worked, I had to do that on the css file's as well, put the oakley before the
×
×
  • 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.