custom joomla page

Posted on 2011-05-05
Last Modified: 2012-06-27
I am trying to create a custom joomla page that pull put the data entered in a database such as


I am a .net programmer and have very few knboledge of php , how would I do this , this is the page that i currently have
Note that this line: /F (
determines the PDF File to be filled in. Change to point to the
PDF file on your site. txtName variable is the user's name to populate.


$txtName  = $_GET['givenname'];

echo $txtName ;
//$txtName  =  $this->get('firstname');
//echo $this->session->title; 

//$txtCourseName = $GET['txtCourseName'];
//$txtCourseName = $GET['txtCompletionDate'];
header("Content-type: application/vnd.fdf");
echo <<<EOT
1 0 obj
/T (txtName)
/V ({$txtName})
/F (http://appdevelsvr:8080/shquiz/media/certificate/CourseCertificate.pdf)

/Root 1 0 R

Open in new window

Question by:TonyReba
    LVL 107

    Expert Comment

    by:Ray Paseur
    How does Joomla fit into this question?  It looks more like a script to create a PDF?
    LVL 9

    Author Comment

    Well my  first goal is to be able to pull the data either by quering the mysql database on Joomla, or the classes in Joomla and display in a Joomla page,   After that I need to create a pdf form with those retreived values..

    Can you please help, at least give me a starting point on where to look this values ?
    LVL 13

    Expert Comment

    Here's what I use to accomplish that.  (I have built extremely complex custom php pages for my company on more than 1 Joomla web application.)

    1) Install Jumi.

    2) Create a custom php page and place it in this location:

    3) Go to Components and select Jumi Application

    4) Click on "NEW"

    5) Enter a title and the path to the custom page.
    See Screen shot.

    6) Create new menu item, use Jumi Application and point to custom file you created.

    This should do the trick.  If you have any problems, let me know.
    LVL 13

    Accepted Solution

    Here's a sample page I created for a small web app...

    This pulls information from the database into my custom page that I linked to on the previous post.

    *The "require_once('db.php');" file is just pulling another .php file I created that creates the database connection I needed to query the database.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <html xmlns="">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    $status = $_GET['status'];
    if ($status == 'LEGAL')
    	$status = 'LEGAL REVIEW';	
    $query = mysql_query("SELECT * FROM jos_a_complaint where status = '$status'");
    $count  = mysql_num_rows($query);
    <div id="upper_text" style="text-align:center">
    <p>Please select which status you would like to report on:</p>
    <table align="center">
    <td><div class="reporting_option"><a href="http://intranet/mapadb/index.php?option=com_jumi&view=application&fileid=5&Itemid=163&status=NEW" id="report_single">NEW</a></div></td>
    <td><div class="reporting_option"><a href="http://intranet/mapadb/index.php?option=com_jumi&view=application&fileid=5&Itemid=163&status=OPEN" id="report_single">OPEN</a></div></td>
    <td><div class="reporting_option"><a href="http://intranet/mapadb/index.php?option=com_jumi&view=application&fileid=5&Itemid=163&status=LEGAL" id="report_single">LEGAL REVIEW</a></div></td>
    <td><div class="reporting_option"><a href="http://intranet/mapadb/index.php?option=com_jumi&view=application&fileid=5&Itemid=163&status=CLOSED" id="report_single">CLOSED</a></div></td>
    if($count == '0')
    	echo '<br /><br /><div style=\'text-align:center\';>We\'re sorry, but there are currently no records with that status.</div>';
    <br />
    <table align="center" class="status_report" cellpadding="15px" cellspacing="0">
    	<th>File #:</th><th>Date Entered:</th><th>Last Name:</th><th>First Name</th><th>Class Code:</th>
    $fileNum = $row['fileNum'];
    $compDate = $row['compDate'];
    $lastName = $row['lastName'];
    $firstName = $row['firstName'];
    $classCode = $row['classCodeID'];
    $query2 = mysql_query("SELECT * FROM jos_a_classcode where id = $classCode");
    while($rows = mysql_fetch_array($query2))
    $codeDesc = $rows['codeDesc'];
    <tr style="border-top: 1px solid #ccc;">
    	<td style="text-align:center"><?php print $fileNum;?></td><td style="text-align:center"><?php print $compDate;?></td><td><?php print $lastName;?></td><td><?php print $firstName;?></td><td><?php print $classCode . " - " . $codeDesc;?></td>
    <?php } ?>

    Open in new window

    LVL 9

    Author Closing Comment


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    This is a general how to create your own custom plugin system for your PHP application that you designed (or wish to extend a third party program to have plugin functionality that doesn't have it yet).  This is not how to make plugins for existing s…
    A colleague recently asked me about how to give his client a small part of the web site that could be completely under the client's control.  Since I have done this sort of thing before to add emergency banners to a web site, I decided I would creat…
    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 dynamically set the form action using jQuery.

    733 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

    17 Experts available now in Live!

    Get 1:1 Help Now