PHP and HTML FORM HELP PLEASE

I need a little help. I am trying to get some pictures of some puppies in 5 boxes. I think I need to make an Array of puppy names, but I’m not sure. Also could someone tell me where I am messing up at when I am trying to get “Hoss”, “Gentry,Arkansas” etc. in the box. Please and Thank you! :smiley:

[php] <?php
echo ‘’;
echo ‘’;
echo ‘Find A Pet’;
echo ‘<meta content=“en-us” http-equiv=“Content-Language”>’;
echo ‘<link rel=“shortcut icon” href="…/…/ourPets/FindAPet/PuppyPannel/images/favicon.ico">’;
echo ‘<style type=“text/css”>’;
echo ‘.auto-style1 {font-size: large;}’;
echo ‘.auto-style2 {font-size: large;text-align: right;}’;
echo ‘’;

echo ‘’;
echo ‘’;

/*
$i = 0;
$tops;
$HOFF = 101;
$tops=24;
$tops + HOFF;
tops = $tops + “px”;
echo $tops;
exit;
*/
$i=5;
while ($i > 0)
{
echo ‘

’;
echo ‘
’;
echo ‘’;
echo ‘’;
echo ‘
’;
echo ‘
’;
echo ‘
’;
echo ‘
’;
echo ‘’;
echo ‘’;
echo '';
echo ‘’;
echo ‘’;
$i=$i-1;

}	
 echo '</tr>';
 echo '</table>';
 echo '</body>';
echo '</html>';

?>
[/php]

Hoss ’;
echo ’ 
BassetHound
Male, 8 Weeks  
Gentry, Arkansas, 72734 $600.00

You should have an array of puppy names/descriptions/image filenames/etc, yes.

And your code… You have a lot of work to do to make this managable. Is this a single page site? If not you should consider splitting the page up in header/menu/page/footer. You should also stop echo’ing html

Haven’t I started cleaning up this code before?

Just adding my .02 cents wouldn’t this be better done in jQuery(JavaScript)? Though it can be done in php though with no problem.

First thing I would do is get rid of the echoing all of the HTML like already stated and get rid of the inline css styling that to me is just lazy coding (Sorry truth hurts).

[code]


Cute Puppies
[/code]

then all you need to do is style the image box

for example:

.image-box { display: block; float: left; width: 100px; height: 100px; margin-left: 5px; }

I let you give the php a try, it really isn’t that hard if you think about it. HINT: It involves manipulating the html code that I wrote. :wink:

Sponsor our Newsletter | Privacy Policy | Terms of Service