Web Analytics Made Easy -
StatCounter Creation - CodingForum

Announcement

Collapse
No announcement yet.

Creation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creation

    Hey everyone. I was wondering if this is possible, im pretty sure it is, i just dont know what to do first to build it-ok:
    I want to have a form in which users fill in, consisting of a browse buton to upload a pic, and text fields. Simple so far .... after you submit this i would like it to go onto its own page (in certain areas, like of html). If you submit a picture, it goes directly into a certain spot in its own page along with text submitted all into certain areas. I guess you could say an example of this would be...sites like purevolume.com where a band can submit their info and a picture and its all entered into a specific already layed out file. ...any ideas? or do i make no sense at all lol.....

  • #2
    templates.

    there are a yaksload of ways to approach this but the basic idea is , create a template..

    /*my_template.tpl*/
    <html>
    <body>
    <div class="about">{about}</div>
    <div class="image">{image}</div>
    <div class="contact">{contact}</div>
    </body>
    </html>

    then grab your user submitted data from the DB or wherever &
    load your template...

    PHP Code:
    <?
    $tpl 
    implode''file'my_template.tpl' ) );
    ?>

    then fill & parse it ...

    <?
    $image 
    '<img src=".... etc
    $output = str_replace( 
        array( '
    {about}' , '{image}' , '{contact}' ),
        array( $about , $image , $contact ),
        $tpl
    );
    ?>

    then display (echo $output) or better still create a static .html file (fopen() etc)
    its far to big a thing to cover in 1 post but you see the basic plan ?
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

    Comment


    • #3
      that helps , thanx, one thing...how do i grab the info. and how do i allow people to upload pictures to the database that will be posted on this template im making.

      Comment


      • #4
        then display (echo $output) or better still create a static .html file (fopen() etc)
        also...what does this mean

        Comment

        Working...
        X