Jump to content

lard

Members
  • Posts

    23
  • Joined

  • Last visited

About lard

  • Birthday 01/01/1980

Contact Methods

  • MSN
    richbenton1@gmail.com
  • Website URL
    http://www.rakebackmountain.net

Profile Information

  • Gender
    Male
  • Location
    England

lard's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Can anyone enlighten me on why this doesn't redirect and if there's a better / different way of achieving a redirect deep within a page? <?php echo"anything"; // remove this echo or even make it blank and it redirects as expected header("location:blah.php"); ?>
  2. Thanks again ginerjm. I've located my ini file and the correct setting and now all is working as it should be. Thank you! And for the last bit
  3. Not being a dick does not mean wishy washy fake smile rubbish.
  4. I'm not going to read that because you've clearly missed my point. Be nice, people will be nice back.
  5. Wow, someone got out of bed on the wrong side. Your opening gambit of 'First of all' may as well have been shouted at your bored wife because of your frustration at your underachieving kids. How about you try reading what's been written before wading in with your size 11s? If you read my code with your expert eye, and the fact that I've stated that my server is providing php perfectly adequately in other respects, you'll realise that there's not exactly a lot of errors possible. I mean, what am I going to get, a connection error? I've clearly made the code as simple as it could be to eliminate as many extraneous issues as possible. Okay, so I'm a newbie, I'm sure there's things that could return, that Mr Doesn't Realise He's On The Spectrum could point out in his anally retentive manner, but check out my response to the delightfully helpful 'ginerjm' after he / she very courteously reported that the code works, and therefore should work for me given the correct settings; I've concluded my problem's source and will address it. What is the point of your response Jacques? Oh yeah, back to your underlying frustration with wife, kids, life....whatever. I'd say thanks for your help but no thanks, you haven't been any. Do you find that talking to people like that face to face elicits positive responses? Or do you lack the emotional intelligence to be able to tell? Courtesy costs nothing. Not responding would have been easier. Responding in the way that you did, especially when it's unnecessary, gets zero respect from any self respecting person. What, you need to provide enough responses to get out of the forum whatever it is you get out of it? Many thanks to you ginerjm, you gave me enough information to direct me correctly. Apologies for responding in this way, but I'm fed up of people who clearly have excellent knowledge in a certain field being disrespectful and failing to understand where they fall down. I'll ask a further question if I'm unable to find what I need to, but should that be the case, I suspect I'll start a new thread. Cheerio.
  6. Trouble is I'm not a good php programmer Many thanks, I figured that it may well be my settings, but thought it was worth asking before wasting a couple of hours.
  7. Hi all So I'm back to being a php newbie after not touching the stuff for years....and straight back to being pretty sure I'm just incredibly stupid. I want to grab the contents of a url onto a string so that I can search the string and use the contents. I think this should work: <?php $homepage = file_get_contents('http://www.example.com/'); echo "Homepage = " . $homepage; ?> But it doesn't. What am I doing wrong, or could there be an issue with my server that means it's not able to perform this maybe? (It's working fine for everything so far) Or is there another way of achieving this? Thanks!!
  8. Hi all I've got an issue with time zones for displaying information. I'm hoping someone might know of a guide that would cover the following. I'm struggling to find one! Basically I have many online events to list in many different timezones. Users may wish to use their time zone to display information in. What I would like to do is store a timestamp and timezone for each event, then will need (I think!) to convert all to a single timezone in order to list them chronologically. From that I would then convert them into the user's desired timezone and display to the page. The idea to is avoid changes in time throughout the year, so it does it all automatically. Any links, tips, words of advice very gratefully received!
  9. I knew it'd be simple for someone clever! Thanks chap
  10. Hi folks. My question is two fold, firstly I'm trying to use preg_match to strip some data between 2 bits of code. What I have so far is: $string="<p>This is the bit that i want</p><p>I don't want this</p>"; preg_match('/<p>(.+)<\/p>/',$string,$match); $new=$match[1]; echo $new; Which produces This is the bit that i want</p><p>I don't want this How do I make it search for the first instance of </p> rather than the last? I presume that the key lies in the (.+) part, which leads me to my next question. I don't really know what (.+) means (got it from someone else's thread) so it's a struggle to figure it out. Trying to google it is really no help - there are no results, just like with many similar things. Does anyone know of good comprehensive (!!) lists of such things or much better, how to search for info on them. I'm sure google must have covered this somehow but I can't figure it. Any help much appreciated!
  11. Hi I've got a page that includes a file according to the query string. I'd like to display a custom message rather than the normal php error messages. So what I currently have is: <?php $path=$_SERVER['QUERY_STRING']; include("$path.php"); ?> I was hoping to be able to do something like this, but obviously it doesn't work... <?php $path=$_SERVER['QUERY_STRING']; if (!$path) { echo "Sorry, that page cannot be found"; } include("$path.php"); ?> Any ideas?
  12. I'm not sure exactly what syntax I need here. I need some kind of 'AND OR' if that makes sense. Using OR on it's own brings in extra records because because I have other WHERE variables which need to work in conjuntion with it. My code so far is: SELECT * FROM `events` INNER JOIN `sites` WHERE events.siteName = sites.siteName AND date > NOW() OR date = '0000:00:00' ORDER BY date, startTime, sites.displaySiteName So the OR means that loads of extra info is now listed (because of the INNER JOIN). Lots more requirements will be added as I go too. I hope that makes sense... So is there such a thing as an 'AND OR'?
  13. I know what you're saying and I'm sure you're right. Unfortunately I'm new to this stuff - databases are not my forte! I have given it a fair bit of thought but my sql knowledge is very limited too so I'm not totally sure how far I can use that. It's a steep learning curve from here on in...
  14. Thanks for that crayon. I totally get that you're right it should be done as much within the sql query as possible. I think I'll use your idea for the null dates (incidentally it's 0000:00:00 format). I had attacked it in a different way, by entering 3000:01:01 for any records without dates but your way is much better. I don't think I have any choice but to do some of the filtering outside of the query because of the complexities of the differences in types of data, but I might be wrong. I'll post some of my code later when I've got a bit further with it.
  15. Finally found the right syntax - what I was talking about was: while($row = mysql_fetch_array($result)) { if( ! $argument) continue; }
×
×
  • 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.