Jump to content


Staff Alumni
  • Posts

  • Joined

  • Last visited

About cags

  • Birthday 07/03/1983

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Leicestershire, UK

cags's Achievements


Member (2/5)



  1. No real difference to joe92's pattern, just a slightly different take of... preg_replace('/£\d+(?:\.\d{2})/', "<tag>\0</tag>", $title); I think it should work, though I did just get up, so it's not tested
  2. It's because the redirected url also matches the pattern (since .* matches everything). You should be able to do something like this to avoid that... RewriteCond %{HTTP_HOST} !www.domain.com$ [NC] RewriteCond %{HTTP_HOST} ^([a-z0-9-]+).domain.com [NC] RewriteCond %{REQUEST_URI} !^partners/ [NC] RewriteRule (.*) partners/%1/$1 [P,L] Should only rewrite patterns that done begin with the partners/ directory
  3. What happens if you remove 'http://domain.com/' from the start of the substitution, leaving you with... RewriteEngine On Options +FollowSymLinks RewriteBase / RewriteCond %{HTTP_HOST} !www.domain.com$ [NC] RewriteCond %{HTTP_HOST} ^([a-z0-9-]+).domain.com [NC] RewriteRule (.*) partners/%1/$1 [P,L]
  4. Excellent, glad it's working. I must admit I've had strange caching issues with .htaccess before, I'm not entirely sure what causes them.
  5. @PFMaBiSmAd I just realised the OP has used at least 3 different timestamps in this thread, we were probably checking different values.
  6. It's 06:05AM GMT not 05:05 GMT isn't it?! 2006-09-01 06:05:00AM GMT
  7. Thinking about it, I don't think underscore is a valid subdomain character, that could well be the problem. I think they have to be [a-zA-Z0-9-].
  8. The full error message should tell you where the error is occuring. For some reason PHP is trying to declare fputcsv twice. If you have a user-defined function with this name simply change it, because it is an official function already (Since PHP 5.1.0). Otherwise more information is needed.
  9. As PFMaBiSmAd already mentioned, it's not a problem with the format it's a problem with the timezone. Regardless of whether you do it with Regex, String functions or whatever you will have the same issue when converting between timestamp and date formats. Example: echo date('Y-m-d H:i:s', 1157087100 ); Output (on my system): 2006-09-01 06:05:00 Which as you can see uses the same timestamp as you used, but doesn't give the same value as either what your getting or what you think the answer should be. A unix timestamp is stored as UTC ie ~GMT. When you use date it converts this value to whatever that time translates to in the current timezone of the server. If this is a one time thing you will just have to calculate the difference between your timezone and the required result and add/subtract the value as appropriate.
  10. Doing it item at a time like that would likely cause the file to go missing which is why I suggested just copying the $_FILES array, but even that likely will make the file disappear, you might have to save the image to a temp directory in the first script in order to keep access to it.
  11. I don't understand the question, the code you currently have seems to achieve what you seem to want. Obviously it's not though otherwise you wouldn't have posted. Please give an example in this format.... Requested URL = the address your typing in to test it Actual file URL = the address of the file you wish to show, including the query string Desired Addressbar URL = the value you wish to appear in the address bar, only applies if it's different to Requested URL Problem = whichever one of these things is not occurring, and what the value your getting is
  12. The simplest solution would perhaps be to insert them into a SESSION on the first script. session_start(); if(isset($_POST['submit'])) { $_SESSION['files'] = $_FILES; $_SESSION['title'] = $_GET['title']; $_SESSION['comment'] = $_GET['comment']; } Then on the other script just access them using the $_SESSSION array.
  13. Your nested loops firstly loop through each checked item. Then for each checked item the inner loop sets `datereturned` equal to the value of the current checkbox. Thus when the loops are finished the value of every row with a `borrowid` id that was checked will equal the value of the last item in the retur[] array.
  14. To clarify what thorpe and Dennis1986 are saying, it's not possible to to simply use a mailto link as the action on a form and make it send an e-mail, pre-fill in an e-mail etc. If you are using a form in that manner you will need to submit to a script on your page and use the mail function to send the actual e-mail, thus bypassing the users e-mail client. Alternatively you have a standard anchor link on your page with that title, which will open their e-mail client, this does not use a form at all. For more detailed help we need more information to put the code you posted into context. Alternatively you can pick a ready made script for a few $'s if you wanted to for example Simple Feedback Form, or there are plenty of free tutorial about this around.
  15. Is your site by any chance running in a Frame, or being ran on a host using Frame Redirect?
  • 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.