Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Script needs its output aligned.
Old 07-28-2008, 09:58 PM Script needs its output aligned.
Super Talker

Posts: 119
Trades: 0
Ive got a contact form written in php, that I include on my website.

The contact form doesnt seem to want to align properly, the way I want it, and I cant figure out how to make it do so.

The script adds the stuff to my site with this little bit of code
PHP Code:
<?php
    $myContact 
= new maxContact();
    
$myContact->processForm();
?>
the actual script itself is a little bit larger, but here is the section that draws the contact form elements.

PHP Code:
    function showForm(){
      
$message '';  
      echo 
'<form action="'.$_SERVER['PHP_SELF'].'" method="post">';
      echo 
'  <table width="100%">';
      echo 
'   <tr><td width="50%">Name:</td><td width="50%">Email:</td></tr>'
          
.'   <tr><td><input type="text" name="name" value="'.$this->name.'" size="35" /></td><td>';
      echo 
'   <input type="text" name="email" value="'.$this->email.'" size="35"/></td></tr>';
          
      
// Now display additional elements    
      //foreach ($this->fieldList as $value) {
      //    echo '   <tr><td>'.$value['caption'].':</td></tr>'
      //        .'   <tr><td><input type="text" name="'.$value['fieldName'].'" value="'.$value['value'].'" /></td></tr>';
      //}            
      
      
echo '    <tr><td colspan="2">Message:</td></tr>'
          
.'    <tr><td colspan="2" ><textarea cols="65" rows="6" name="message">'.$this->message.'</textarea></td></tr>'
          
.'<tr><td align="center" colspan="2"><input type="submit" name="submitBtn" class="sbtn" value="Submit" /></td></tr>';
      echo 
'  </table>';
      echo 
'</form>';
    } 
What I want to do, is have the "Name" aligned left like it is, but have the "Email" field aligned right, so it lines up with the right side of the "message" box. the actual words "name" and "Email" are fine as they are, the inputs will just need to be made longer or something.

the other problem im having here is the width adjustment. as it is now, i cant get it to fit in the area that its supposed to, properly.

The site is www.teamspeakdisplay.com (Username: user / Password: teamspeakdisplay) take a look at the contact area and you will see what I mean.
BigJohnny is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Script needs its output aligned.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.42987 seconds with 12 queries