Ok, I will be honest. I am very new to PHP. About 2-3 weeks, working on and off with it. I have been assigned the task of learning PHP as well as writing up some code to test out. So, I have been banging my head around for awhile with PHP and figured I would post some of my code that I have drafted up. Now, what I have here is what the management wants. I will try and explain.
I have 5 php files that will all be used.
I will post them in here:
File 1, the start file:
<?php
//This is the display page
session_start();
include_once 'bannerobejct.php';
Obviously not finished. But, it calls another file:
File 2, bannerobject.php
<?
//variables
$fQuotes = 0;
$fCustomerID = 0;
$fLoanOfficerID = 0;
//Arrays
$fQuoteArray = Array ();
Include_Once("quotes.php");
$fQuoteArray = quote_stuff("All");
$fshuffledQuoteArray = shuffle($fQuoteArray);
var_dump($fQuoteArray);
?>
File 3, quotes.php
<?php
//This is the quotes handler file
function quote_stuff()
{
$fQuotes[0] =array("Quote"=>"He is very loud!");
$fQuotes[1] =array("Quote"=>"She is a great person to deal work with.");
$fQuotes[2] =array("Quote"=>"He knows his stuff!");
$fQuotes[3] =array("Quote"=>"Great person to work with. Flawless.");
$fQuotes[4] =array("Quote"=>"Really nice person. Very pleasant.");
return $fQuotes;
}
?>
Let me put in the last two files:
File 4, customer.php
<?php
//This is the Customer handler file
function customer_stuff()
{
$fCustomerID[0] =array("Firstname"=>"Jill", "Lastname"=>"Paasch");
$fCustomerID[1] =array("Firstname"=>"Richard", "Lastname"=>"Killbane");
$fCustomerID[2] =array("Firstname"=>"Bao", "Lastname"=>"Nguyen");
$fCustomerID[3] =array("Firstname"=>"Adam", "Lastname"=>"Smith");
return $fCustomerID;
}
?>
File 5, employees.php
<?php
//This is the LO Handler File
function lo_stuff()
{
$fLoanOfficerID[0] =array("Firstname"=>"Justin", "Lastname"=>"Rude");
$fLoanOfficerID[1] =array("FirstName"=>"Jeff", "Lastname"=>"Shaved");
$fLoanOfficerID[2] =array("FirstName"=>"Chris", "Lastname"=>"Bomber");
$fLoanOfficerID[3] =array("FirstName"=>"Matt", "Lastname"=>"Bionic");
$fLoanOfficerID[4] =array("FirstName"=>"Cynthia", "Lastname"=>"Woman");
return $fLoanOfficerID;
}
?>
Ok, let me try and explain what I am attemtpting to do.
Basically, as you can see, the files are setup to try and pull random quotes and information from the files.
For instance, the quotes.php file has quotes that should line up accordingly with people from the customer and employee files.
What I am trying to figure is out to set this up.
It should work so when you go to our page, a random customer, quote and employee should pop up in a banner almost. The customer that is being pulled should line up with a quote from that customer and point to the appropriate employee.
Does this make sense? I apologize if it does not. My head is tired after plugging away on this for some time.
I would be indebted if someone can help me out here.
I apologize for the long post.
Thanks.
Tarballed