getting quotes

Posted on 2008-11-06
Last Modified: 2012-05-05
ok im trying to get quotes from my forum so users are able to quote other users posts...

what i came upwith is this

on the forumpgae display a quote button that has a form like so

   <form action="index.php?page=reply&id=<? echo $forumpostid ?>" method="post" name="quote">
        <input name="quote3" type="hidden" value="<? echo $getreplies3['postid'];?>" />
        <input type="submit" value="quote" />

then on the action page display a textbox that shows the below code... the thing is nothing shows up in the textbox ??
<textarea id="inputforum" class="inputforum" name='yourpost' rows='5' cols='40'><?php if(isset($_POST['quote'])) {

                        $quote= $_POST['quote'];




 <? echo $quote; }?> </textarea>

Open in new window

Question by:runnerjp
    LVL 4

    Expert Comment

    Sholdn't you be refering to the hidden input named "quote3"? $_POST['quote3']...
    LVL 107

    Expert Comment

    by:Ray Paseur
    You may want to show us a little more of this than what you posted above.  Where do these variables come from?

    Also, in your input you have <input name=quote3 but in your action script you have if(isset($_POST['quote'] and I think you'll find that quote3 and quote are not the same thing.

    Author Comment

    ahh yes got it working :)... is this the best way to do it?

    also below is how i show my quotes..

    how could i make it look like the image added so that the user who quoted it is added ect and it looks smart?

    "[quote]" => "<p style=\"background: #E2E2E2; border: 1px solid #99b3b4; padding: 6px;\"><span style=\"font: bold 10px Courier New;\"></span>", "[/quote]" => "</p>" 

    Open in new window


    Author Comment

    or anything fancy like that~?
    LVL 107

    Accepted Solution

    I think your quote scheme looks fine.

    <snip>how could i make it look like the image</snip>

    That's really a separate question.  What you're looking for is called a "teaser fragment" in online journalism.

    Anyway, glad you got the input and action scripts working together!  Best regards, ~Ray
    LVL 4

    Expert Comment

    Good thing it worked :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Suggested Solutions

    Title # Comments Views Activity
    Referer ID 5 28
    PHP get months from date search query where user 40 39
    Generating Excel in php 5 30
    Image not there 4 6
    Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib…
    Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now