Announcement

Collapse
No announcement yet.

How to Include Testimonials?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to Include Testimonials?

    I would like to add a page to my site where visitors can leave (post) a comment or testimonial. What script can I usefrom the Fantastico suite?

    Joomla looks like much more than I need. Plus I'm not sure where to install it.
    Need some help!

    Thanks

  • #2
    Re: How to Include Testimonials?

    you can easily create a testimonial page, using php and phpmyadmin, all you need to do is create two text boxes, one called name and the other one called comment, and obviously you need to create a button and make sure there in the form area you have created. Once then you should create another page but it has to be a php page, this is the page where you will have the comments posted into the database.

    PHP Code:
    <?php
    $con 
    mysql_connect("localhost","username","password");
    if (!
    $con)
      {
      die(
    'Could not connect: ' mysql_error());
      }

    mysql_select_db("username_testimonials"$con);

    mysql_query("INSERT INTO testimonial (Name, Comment) 
    VALUES ('
    $name', '$comment')");

    mysql_close($con);
    ?>
    Remember to replace the username and password with your username and password, anything that has username replace it with your username!
    this above is what you put on the php page.

    After this you will have to create a database so go to MySQL Databases in your cpanel and then create one called testimonials. Now once then go back to cpanel main menu and go to phpmyadmin go and click on testimonials on the left side then click SQL then add the table called testimonial then add the columns Name and Comment, and then for Name pick varchar then after type 100 then for comment pick Text and then press Save, then you are done, make sure you published the pages, and in the form you created earlier double click on the form and make sure the action is set to where you published your php page, once then your done.

    Now to show the comments people made you just add this to the php page or under the form, but make sure the form page is a php page.

    PHP Code:
    <?php
    $con 
    mysql_connect("localhost","username","password");
    if (!
    $con)
      {
      die(
    'Could not connect: ' mysql_error());
      }

    mysql_select_db("username_testimonials"$con);

    $result mysql_query("SELECT * FROM testimonial");

    while(
    $row mysql_fetch_array($result))
      {
      echo 
    $row['Name'] . ":<br> " $row['Comment'];
      echo 
    "<br />";
      }

    mysql_close($con);
    ?>
    Remember to replace username and password, now your done
    Check out:
    Great Windmill (A Place Where You Can Have Fun!)

    You can do so much on the website, check it out!

    Comment


    • #3
      Re: How to Include Testimonials?

      Thank you so much for the very detailed response. It was most helpful.I will give it a try.

      Comment


      • #4
        Re: How to Include Testimonials?

        Or, use BV's built in guestbook.
        Navaldesign
        Logger Lite: Low Cost, Customizable, multifeatured Login script
        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

        Comment

        Working...
        X