Welcome to Dream.In.Code
Become a PHP Expert!

Join 137,431 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,905 people online right now. Registration is fast and FREE... Join Now!




PHP & HTML

 
Reply to this topicStart new topic

PHP & HTML

Barmoen
26 Jan, 2008 - 12:55 PM
Post #1

New D.I.C Head
*

Joined: 10 Jan, 2008
Posts: 8

Hello.

I got a simple question, though google couldn't assist me. blink.gif

How the jesus could I get my pictures that I made the design with, together with my PHP?
I simply cant do it.. tried everything..
Can anyone please help me? crazy.gif
User is offlineProfile CardPM
+Quote Post

dontKnowJava
RE: PHP & HTML
26 Jan, 2008 - 01:18 PM
Post #2

D.I.C Head
**

Joined: 29 Sep, 2007
Posts: 213


My Contributions
not really sure what you mean by 'get pictures with php', but you can output html code with php to reference the location of your pics. but that kinda would be pointless and slower than just referencing it straight in your htm file. maybe if you can give more details on what exactly youre trying to do
User is offlineProfile CardPM
+Quote Post

Barmoen
RE: PHP & HTML
26 Jan, 2008 - 01:23 PM
Post #3

New D.I.C Head
*

Joined: 10 Jan, 2008
Posts: 8

Well, im trying to make a website, with PHP.. but im not quite sure how to get the design I made , together with PHP and HTML coding.
User is offlineProfile CardPM
+Quote Post

dontKnowJava
RE: PHP & HTML
26 Jan, 2008 - 01:33 PM
Post #4

D.I.C Head
**

Joined: 29 Sep, 2007
Posts: 213


My Contributions
what you do first is make your design in html. once you got that, php code can be written in separate files and integrated into your html or even embedded into your html after its finished.
User is offlineProfile CardPM
+Quote Post

Barmoen
RE: PHP & HTML
26 Jan, 2008 - 01:56 PM
Post #5

New D.I.C Head
*

Joined: 10 Jan, 2008
Posts: 8

what do I write then, to intergrate them into the html?
User is offlineProfile CardPM
+Quote Post

no2pencil
RE: PHP & HTML
26 Jan, 2008 - 03:48 PM
Post #6

My fridge be runnin OH NOEZ!
Group Icon

Joined: 10 May, 2007
Posts: 6,550



Thanked: 67 times
Dream Kudos: 2425
Expert In: Goofing Off

My Contributions
QUOTE(Barmoen @ 26 Jan, 2008 - 02:56 PM) *

what do I write then, to intergrate them into the html?

CODE

<?php

  echo "<html><head><title>This is a php generated page</title>";
  echo "</head><body align=center>";
  echo "<table border=1>";
  for($i=0;$i<10;$i++) {
    echo "<tr><td> Table row # ".$i."</td></tr>";
  }
  echo "</table></body></html>";
?>


something like this....?

If this is what you are looking for, you might want to have a read of some example code over at php.net

This post has been edited by no2pencil: 26 Jan, 2008 - 03:49 PM
User is offlineProfile CardPM
+Quote Post

Mike007
RE: PHP & HTML
26 Jan, 2008 - 10:43 PM
Post #7

D.I.C Head
Group Icon

Joined: 30 Aug, 2007
Posts: 205


Dream Kudos: 75
My Contributions
QUOTE(no2pencil @ 26 Jan, 2008 - 04:48 PM) *

QUOTE(Barmoen @ 26 Jan, 2008 - 02:56 PM) *

what do I write then, to intergrate them into the html?

CODE

<?php

  echo "<html><head><title>This is a php generated page</title>";
  echo "</head><body align=center>";
  echo "<table border=1>";
  for($i=0;$i<10;$i++) {
    echo "<tr><td> Table row # ".$i."</td></tr>";
  }
  echo "</table></body></html>";
?>


something like this....?

If this is what you are looking for, you might want to have a read of some example code over at php.net


I would say that's a really bad idea to just use echos, a better one is to use a templating engine. But as someone already said, first get ALL of your website in HTML! Then correct the css after some testing if needed add javascript. Only after you have it all compelete worry about the dynamic part, or the PHP. Trust me it will save you a ton of time, learned it myself, it's alot easier to develop the php and the templates if you know exactly what the output is supposed to look like.

To find some information on php + mysql go to http://www.3dbuzz.com, sign up, they have free great tutorials for php, that is video tutorials smile.gif. Now about a templating solution, probably the best one is Smarty, but there are others out there, smarty just works for me, haven't had a reason to try anything else really. You can find out about it here: http://www.smarty.net.

Good luck.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/5/08 04:58AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month