Jump to content

TEENFRONT

Members
  • Posts

    338
  • Joined

  • Last visited

    Never

Posts posted by TEENFRONT

  1. i was taking the mick outta his "as a webmaster" comment lol.

     

    Reckon hes sat there in a big chair with a sign that says..."Webmaster" on his desk?

     

    Only kidding!!!  Yeah whipping together a php script to email users is easy using the mail() function, do a search. I think he also wants to a register script to register emails aswell so thats harder.. so "as a webmaster" not a "coder" buying one will be much easier. There cheap as the proverbial chips.

  2. Honestly

     

    If your new to PHP, forum software is a good place to start.

     

    Install a forum on your server, learn how it works, add a few mods to it etc get used to editing files, php etc.

     

    Then learn how to add your own mods to the forum.

     

    Reason i say this is cause its how i learnt, the forum has its own login system, its own gallery mods etc etc. Before you go ahead and make your own, id experiment with a forums pre-coded mods to get used to it. You can then dabble in creating your own pages based off the forum login system etc etc. trust me if works like a treat and you will be reading to code solo no time.

  3. Hey

     

    So what are you trying to do again? Got an example of the output that you want to do?  is it like this

     

    Adam    4 cases

    Barry    5 cases

    Caroline 2 cases

     

    etc?

     

    If so id run the first query to select * from table  blah blah blah to give you $firstname $lastname etc etc

     

    then in that query while() loop the 2nd query can just be select * from table where firstname = $firstname then use mysql_num_rows to count the rows per name.

     

    The output $firstname  $rows

     

     

  4. u know whats spooky...

     

    Iv been doing this for the past 2 days.. the EXACT same thing and i too are wanting to change the names and bold the titles. Just not got to that bit yet, so il let you know when i get there. If not, maybe someone else can help untill then?

  5. Hey

     

    Thanks for that. Wooooooosh straight over my head.

     

    Any additional help would be appreciated. This is a cut down version of my code, how would i implement kenrbnsn's example above?

     

    while($r=mysql_fetch_array($result))
    {
    
    $jobday = explode("/", $date[0]);
    echo $jobday[0];
    echo $image;
    
    }
    
    

     

    So the above will output this (say there is 6 records to loop through from the db)

     

    22  img

    22  img

    21  img

    21  img

    20  img

    20  img

     

    i only want to show "img" if the date number if different to the previous date. kenrbnsn's example looks like what i need when i run it in isolation but i dont know how to fit that into my while loop to work?

     

  6. Hey

     

    Il jump straight in with my question. I have a while() loop outputting info from the db but im having trouble telling if a certain value has changed from the last loop, and if it is different i want to show an image. Showing an image is not the problem, just the telling if the value is different to the last loop. OK heres my code

     

    $date = explode(" ", $date);     // This splits the date and time (EG 22/01/08 22:15) field into just the date giving me $date[0] in this format DD/MM/YYYY
    $jobday = explode("/", $date[0]);   // This splits the $date[0] to just the first set of numbers so it outputs DD (EG 22) as $jobday[0]
    echo $jobday[0];
    

     

    so it loops through the results and $jobday[0] will output the following results in 6 loops along with an image EG

     

    22  img

    22  img

    22  img

    21  img

    21  img

    20  img

     

    how do i tell if the number has changed between loops? So i only insert an img if the number is different from the last....sooo like this

     

    22  img

    22

    22

    21  img

    21

    20  img

     

     

    I tried things like if($jobday[0] != $jobday[0])  but as $jobday[0] is set inside my loop, $jobday[0] with always equal $jobday[0]. And if i try setting $jobday[0] outside of the while loop then obviosly its not set right for each loop...

     

    Any help????? Im going mad

  7. erm

     

    im not a regex guy but im not sure your doing it right.

     

    preg_match("/^[0-9]+$/", $_GET["m"]);
    

     

    to ME that looks like your only trying to see if "m" has a number between 0 and 9.

     

    AND you dont do anything with "$checkEventMonth". you just do the preg_match then leave the vars alone.

     

    Im guessing you may mean to do this ?

     

    if(($checkEventMonth && $checkEventDay && $checkEventYear) == 1) {
    

  8. Best thing to do is to send from your server. Log the script into pop3 before you send. This way it actually send like an email and not just spam which msn/gmail/yahoo will just whack in the trash folder.

     

     

    To send from hotmail to hotmail and gmail to gmail and yahoo to yahoo and vice versa..whatever, you need exta auth before sending from the relevent servers. Best thing is to send from your own domain name.

  9. well it doesnt plainly mean "before the <html>" ..

     

    EG

     

    <?php
    
    if($var) { echo "weeeee";
    
    header("location: http://");
    
    }
    ?>
    <html>

     

    That would error on headers already sent. as weeee is an ouput.

     

    Do things in php with if and elses and vars and you wont need to output anything at all untill you actually want to show the visitor something.

  10. Becareful with your little "bomb" script mate. Your host can and most likley will get seriosly pissed off with you if you run the script to send 100,000 emails especially on shared hosting.

     

    The server would likley grind to a halt and various services will also stop and/or crash. Shared hosting only allows like 10% of the CPU to be used per account...this is likley to go waaaaay up and get your account banned. Depending on your host, they may also send you/threaten to send you a nasty SPAM bill..

     

    Becareful when sending emails through php. Make sure you only send to opt-in addresses ( and you can prove it ) that way you dont get bummed by the host for spamming.

×
×
  • 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.