Jump to content

runnerjp

Members
  • Posts

    2,214
  • Joined

  • Last visited

Posts posted by runnerjp

  1. hey all ok i have a shoutbox but on a different page....i want it to come up as a pop up box so the information can be entered and then the results will appearin the marquee ( i already know how to do this) its just the opoup windows part :S any1 help
  2. hey all...ok i have this code to retrieve the shouts posted and then its displaed as a marquee

    [quote]<?php
    #################################
    include("shoutbox/config/config.php");
    #################################

    mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());
    // Select the database.
    mysql_select_db($dbname) or die(mysql_error());
    $query = "SELECT message, author, eml FROM shoutbox order by id DESC LIMIT 1";
    $result = mysql_query($query);
    $marquee = "";
    while($r=mysql_fetch_array($result))
    {
      $marquee.= $r[message]. '<a href=\"$r[eml]\">'. $r[author]. '</a>'";
    }
    echo "<marquee><font size='3'>". $marquee. "</font></marqee>";[/quote]

    rite but the shout box i have saves the stuff in a textbox...it has instructions to make it mysql but very complex.... anyways is their away to retrieve the posts from the txt file??
  3. hey ok all iv done to my website is add a layout i created with photoshop and its realllyyy sloww loading ... [url=http://www.runnerselite.com]www.runnerselite.com[/url] is their any way to compress my website or something so it loads faster :(
  4. its wierd  ok iv only got my index page set up and the shoutbox page...and thats oviusly a php.... my files where allready loaded to the site when it was a html site... all iv done is change it to php and it wnt lket me add anything at alll????  i changed it back to html and everything was their....its even loadin slow as if the images are going to apear and they dnt :S
  5. HELL ALL...
    i changed my index.html page to a index.php so that i could use a php script on my site ( the margue so i could have visitors leave messages and it show up in the marquee...yet now when i add text or a picture useing a wysiwyg maker ( sitespinner) i publish the project useing ftp and nothing happens... the site does not get updated.... is it because its a .php site ??
  6. <?php
    #################################
    include("config/config.php");
    #################################

    mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());
    // Select the database.
    mysql_select_db($dbname) or die(mysql_error());
    $query = "SELECT message, author, eml FROM shoutbox order by id DESC LIMIT 1";
    $result = mysql_query($query);
    $marquee = "";
    while($r=mysql_fetch_array($result))
    {
      $marquee.= $r[message]. '<a href=\"$r[eml]\">'. $r[author]. '</a>'";
    }
    echo "<marquee><font size='3'>". $marquee. "</font></marqee>";
    ?>
  7. thanks :D yer colour will be added with pictures and stuff... its just that i did start makin the site got content on it then got told the layout was pants and have had to start from scratch...just by askin now i can add to it and keep makin sure it looks good :D thanks m8


    what wpuld you suggest i do to the top banner cmgmyr
  8. hey hey all... i just want ppl to look at my basic layout b4 i add stuff to it so i can change it if need b.... so whats you all think??

    [url=http://www.runnerselite.com]www.runnerselite.com[/url]
  9. hey hey all ok iv got shout box all set up at [url=http://www.runnerselite.com/shoutbox/shoutbox.php]www.runnerselite.com/shoutbox/shoutbox.php[/url]
    and what im tryin to do is set it up so i can display peoples messages on my index page as a marquee ... so i got this php script to do this

    [code]<?php


    #################################


    include("shoutbox/config/config.php"); -- this is folder i have stuck it in!!


    #################################





    mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());


    // Select the database.


    mysql_select_db($dbname) or die(mysql_error());





    $query = "SELECT message, author, eml FROM shoutbox order by id DESC LIMIT 1";


    $result = mysql_query($query);











        while($r=mysql_fetch_array($result))


        {





            echo "<marquee><font size='3'>$r[message] - <a href=\"$r[eml]\">$r[author]</a></font></marquee>";





        }





            ?>[/code]

    and on my homepage where i wanted the marquee to appear i added this
    <?php include("shoutbox/marq.php")?>

    and nothing seems to happen even tho their is a message "test message" in the shoutbox bit :S any ideas any one pllleeaaasssseeeeee
  10. yup ok im really really confuzzeld
    i have made the shout box

    [code]<style type="text/css">


    <!--


    body,td,th {


            font-size: 14px;


            font-weight: bold;


            color: #FFFFFF;


    }


    body {


            background-color: #333333;


    }


    -->


    </style><b>


    <?php


    // You just need to configure these 4 variables to match your server.


    include("config/config.php");


    // If a user has submitted a post, we want to :


    // 1. Validate it


    // 2. Strip unwanted html


    // 3. Make sure messages and names aren't too long


    // 4. Add it to our database.


    if($_POST['submit']) {


    // 1. Validate it, by checking all the form inputs were filled in


        if(!$_POST['author']) {


            echo 'Error ! : No name entered';


            die;


        }


        if(!$_POST['eml']) {


            echo 'Error ! : No email entered';


            die;


        }


        if(!$_POST['message']) {


            echo 'Error ! : No message entered';


            die;


        }


    // 2. Strip unwanted HTML


    // Look up the strip_tags() function at


    // http://www.php.net/manual/en/function.strip-tags.php for more info


        $message = strip_tags($_POST['message'], '');


        $eml = strip_tags($_POST['eml'], '');


        $author = strip_tags($_POST['author'], '');


    // 3. Make sure messages and names aren't too long


    // We will use the strlen() function to count the length.


        $message_length = strlen($message);


        $author_length = strlen($author);


        if($message_length > 150) {


            echo "Error ! : Your message was too long, messages must be less than 150 chars";


            die;


        }


        if($author_length > 150) {


            echo "Error ! : Your name was too long, names must be less than 150 chars";


            die;


        }


    // 4. Add it to our database.


    // If the script hasn't died yet due to an error in the inputted data


    // we need to add the data to the database


    // Lets connect to our database.


        mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());


    // Select the database.


        mysql_select_db($dbname) or die(mysql_error());


    // Lets define the date format we want to enter to our database


    // go here for more details


    // http://www.php.net/manual/en/function.date.php


        $date = date("h:i A dS M");


    // This will produce 11:02 25th Aug


    // Set the query as $query


        $query = "INSERT INTO shoutbox (message, author, eml, date, ip)


    VALUES ('$message','$author','$eml','$date','$_SERVER[REMOTE_ADDR]')";


        mysql_query($query);


        mysql_close();


        // Show thanks message and take them back to the main shoutbox


        echo "Thanks for your post<BR>";


        echo "<A HREF='shoutbox.php'>View the shoutbox</A>";


    // If they haven't submitted a post, we want to :


    // 1. Show the latest shouts


    // 2. Show the shout post form


    } else {


    // 1. Show the latest shouts


    // Lets connect to our database.


        mysql_connect($host,$dbuser,$dbpass) or die(mysql_error());


    // Select the database.


        mysql_select_db($dbname) or die(mysql_error());


    // Set the query as $query, and get the last 10 posts.


        $query = "SELECT message, author, eml, date, ip


    FROM shoutbox order by id DESC LIMIT 10";


        $result = mysql_query($query);


        echo "<TABLE>";


        while($r=mysql_fetch_array($result))


        {


    // To modify the appearance, edit this :


            echo "<TR>


                <TD><font size='1'>


    Posted $r[date] by <A HREF='mailto:$r[eml]'>


    $r[author]</A></font></TD>


            </TR>


            <TR>


                <TD><font size='1'>$r[message]</font></TD>


            </TR>


            <TR>


                <TD><HR></TD>


            </TR>";





        }


        echo "</TABLE>";


    // 2. Show the shout post form


    ?><style type="text/css">


    <!--


    body,td,th {


            font-family: BankGothic Lt BT;


            font-size: 12px;


    }


    a:link {


            color: #000000;


    }


    a:visited {


            color: #000000;


    }


    a:hover {


            color: #000000;


    }


    a:active {


            color: #000000;


    }


    -->


    </style>





        <FORM METHOD=POST ACTION="shoutbox.php">


        <TABLE>


        <TR>


            <TD>Name :</TD>


            <TD><INPUT TYPE="text" NAME="author"></TD>


        </TR>


        <TR>


            <TD>Email :</TD>


            <TD><INPUT TYPE="text" NAME="eml"></TD>


        </TR>


        <TR>


            <TD>Message :</TD>


            <TD><INPUT TYPE="text" NAME="message"></TD>


        </TR>


        <TR>


            <TD>&nbsp;</TD>


            <TD><INPUT TYPE="submit" name="submit" value="post"></TD>


        </TR>


        </TABLE>


        </FORM>


    <?php


    }


    ?>


    </b>[/code]

    ok i want to add a marquee on my homepage (index page) just showing some of the new posts...can any one give me code to do this cos wats said above is very confuzzlin haha
  11. hey hey all...ok i wanna have a shout box where there is a scrolling area like a marquee on the top of my page saying what is happening.... any way i can do this all  please please help
×
×
  • 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.