New to PHP and need to make my code output look better

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
hothead2002
Forum Newbie
Posts: 2
Joined: Sat Apr 11, 2009 5:14 pm

New to PHP and need to make my code output look better

Post by hothead2002 »

:banghead:

I have my code all ready and sorted but i want to liven up how it looks, change to font, colours etc

here is my code, i am very new to php and any suggestions would be greatly appreciated

Code: Select all

 
 
 
<?php 
 
error_reporting(E_ALL);
 
$dbc=odbc_connect("guestbook1","","");
 
if (!$dbc)
{
    exit("Connection Failed: " . $dbc);
}
 
$query="SELECT * FROM AllCallPredictionsqry";
$rs=odbc_exec($dbc,$query);
 
if (!$rs)
{
    exit("Error in SQL");
}
 
echo '<h3>SIP AREA MANAGEMENT CALLS SYSTEM<h3>';
 
 
while (odbc_fetch_row($rs))
{
    $e_Call_Date=odbc_result($rs,"Call_Date");
    $e_Customer=odbc_result($rs,"Customer");
    $e_Post_Code=odbc_result($rs,"Post_Code");
    echo '<b>Call_Date:</b>'.$e_Call_Date.'<br>';
    echo '<b>Customer:</b> '.$e_Customer.'<br /> <b>Post_Code:</b> ' .$e_Post_Code.'<br /><hr/>';
}
 
odbc_close($dbc);
 
?>
 
 
Last edited by hothead2002 on Sun Apr 12, 2009 3:55 am, edited 2 times in total.
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: HELP !!!

Post by McInfo »

What would you have us do about that? PHP doesn't change fonts and colors. HTML and CSS do, though.

Edit: This post was recovered from search engine cache.
Last edited by McInfo on Mon Jun 14, 2010 1:01 pm, edited 1 time in total.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: HELP !!!

Post by califdon »

I do realize that you're a first-time poster, but you've already broken 2 of the most basic rules of posting in a forum:
  1. Never use Subjects like "HELP !!!" or "PLEEEASE HELP ME! URGENT!!!" -- most of the experienced members (like, the ones who might be able to help you!) will not even bother to read your post. ALWAYS state what your problem is, and leave out all the hysterics!
  2. When you post code, enclose your code in the special BBcode tags

    Code: Select all

     and , to make it more readable. You can use the Code button on the toolbar right above where you post your message.[/list]
    
    I suggest that you go back and EDIT your post to change the Subject and to enclose your code in tags. Then maybe someone will feel they want to take the trouble to read your post and answer it.
hothead2002
Forum Newbie
Posts: 2
Joined: Sat Apr 11, 2009 5:14 pm

Re: HELP !!!

Post by hothead2002 »

thanks ill try and change it

sorry i dont use forums at all
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: New to PHP and need to make my code output look better

Post by califdon »

I fixed your code tag for you (the closing tag uses a forward slash, not a backward slash).

That's a lot better. Now let's consider your issue. It seems that you are asking about the appearance of the web page that is generated from a PHP script. As McInfo said, that has nothing to do with PHP, which is server-side script. The appearance of any web page is determined by the HTML tags and CSS. You may use PHP to send that information to the browser, but it only acts as the method of transmission. So:
  1. You need to learn something about HTML and CSS. I recommend http://w3schools.com.
  2. This topic belongs in our HTML, CSS and UI Design forum, where I will now move it.
[corrected URL above 4-27-09]

If you will learn how to use forums, you will find that you can answer most of your questions. Welcome to PHP and DevNetwork Forums.
Last edited by califdon on Mon Apr 27, 2009 1:50 pm, edited 1 time in total.
Reason: Corrected URL.
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: New to PHP and need to make my code output look better

Post by McInfo »

Not w2schools, http://w3schools.com.

Edit: This post was recovered from search engine cache.
Last edited by McInfo on Mon Jun 14, 2010 1:02 pm, edited 1 time in total.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: New to PHP and need to make my code output look better

Post by califdon »

McInfo wrote:Not w2schools, http://w3schools.com.
YIKES! Yes, assuredly! My bad! Finger slipped. Thanks for catching that. I'll correct it in the original, too, so nobody will try to click on the bad link.
Post Reply