php in mijn layout

Gestart doorRickss4 reacties16 weergaven

5 berichten · pagina 1 van 1

Rickss

Lid · Topicstarter

Berichten
1.601
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
hey,

ik heb een leuk werken script in php ( contact form )
nou wil ik dit contact script in mijn html layout zetten.
dit layout is css en daar moet een php script wel in passen.:

Contact:

[COLOR= #0000BB]<? 
$emailadres[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"rick@hobbytop.nl"[/COLOR][COLOR= #007700];[/COLOR] 
[COLOR= #0000BB]$sitenaam[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"http://www.hobbytop.nl"[/COLOR][COLOR= #007700];[/COLOR] 

[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]actie[/COLOR][COLOR= #007700]]) ==[/COLOR] [COLOR= #DD0000]"verzenden"[/COLOR][COLOR= #007700]) 
{[/COLOR] 
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]onderwerp[/COLOR][COLOR= #007700]]) ||[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]]) ||[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]]) ||[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]]) ||[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]voornaam[/COLOR][COLOR= #007700]]) ||[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]site[/COLOR][COLOR= #007700]])) 
        {[/COLOR] 
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je moet wel alle velden invullen!!"[/COLOR][COLOR= #007700]; 
        }[/COLOR] 
        [URL="http://www.php.net/else"]else[/URL] 
        [COLOR= #007700]{[/COLOR] 
            [URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$emailadres[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$onderwerp[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"Afzender: $voornaam $naam 
Email adres: $email 
Website: $site Onderwerp: 
$onderwerp 
IP: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" 

Bericht: 
$bericht"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"From: $naam || $sitenaam"[/COLOR][COLOR= #007700]);[/COLOR] 
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Bericht succesvol verzonden!"[/COLOR][COLOR= #007700]; 
        } 
}[/COLOR] 
[URL="http://www.php.net/else"]else[/URL] 
[COLOR= #007700]{[/COLOR] 
?> 
<a href="http://hobbytop.nl">Terug naar de home pagina</a>
    <form method="post" name="verzenden" action="<?=$_SERVER[PHP_SELF]?>?actie=verzenden"> 
    <table width="310" border="0" bgcolor="#CCCCCC"> 
        <tr> 
            <td height="16" width="168"> <img src="form/naam.gif" width="16" height="15"> Naam:</td> 
            <td height="16" width="132"> 
            <input type="text" name="naam" size="22"></td> 
        </tr> 
        <tr> 
            <td height="16" width="168"><img src="form/naam.gif" width="16" height="15"> Voornaam:</td> 
            <td height="16" width="132"> 
            <input type="text" name="voornaam" size="22"></td> 
        </tr>        
        <tr> 
            <td height="27" width="168"><img src="form/email.gif" width="15" height="15"> Emailadres:</td> 
            <td height="27" width="132"> 
                <input type="text" name="email" size="22"></td> 
        </tr> 
        <tr> 
            <td height="16" width="168"><img src="form/website.gif" width="16" height="16"> Website:</td> 
            <td height="16" width="132"> 
            <input type="text" name="site" size="22"></td> 
        </tr>        
        <tr> 
            <td height="17" width="168"><img src="form/bericht.gif" width="16" height="16"> Onderwerp:</td> 
            <td height="17" width="132"> 
            <input type="text" name="onderwerp" size="22"></td> 
        </tr> 
        <tr> 
            <td height="140" colspan="2" align="center">
          <textarea name="bericht" rows="8" cols="47">Tik hier je tekst...</textarea></td> 
        </tr> 
        <tr> 
            <td height="18" colspan="2" align="center"> 
            <input type="submit" value="Verzenden!" name="verzenden">   <input type="reset" value="Wissen" name="wissen">
        </td> 
        </tr> 
    </table> 
    </form>
[COLOR= #0000BB]<?[/COLOR] 
[COLOR= #007700]}[/COLOR] 
?>


layout:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="hobby, top, hobbys" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Hobbytop.nl - Home</title>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<div class="marqueedj"><MARQUEE>Welkom op hobbytop.nl neem contact met ons op als je hier wilt adventeren.<a href="vissen.html">test</a>
</MARQUEE>
</div>
<body>
<div id="wrapper">
    <div id="header">
        <div id="logo">
            <h1><a href="index.html">Hobbytop.nl</a></h1>
            <p>Hobbys en meer</p>
        </div>
    </div>
    <!-- end #header -->
    <div id="menu">
        <ul>
            <li class="current_page_item"><a href="index.html">Home</a></li>
            <li><a href="hobbys.html">Hobbys</a></li>
            <li><a href="top10.html">Top 10</a></li>
            <li><a href="overons.html">Over ons</a></li>
            <li><a href="contact.php">Contact</a></li>
        </ul>
    </div>
    <!-- end #menu -->
    <div id="page">
        <div id="content">
            <div class="post">
                <h2 class="title">Welkom</h2>
                <p class="meta"></p>
                <div class="entry">
            </div>
            <div style="clear: both;">&nbsp;</div>
        </div>
        <!-- end #content -->
        <div id="sidebar">
            <ul>
                <li>
                    <h2>Nieuwtjes</h2>
                    <p>Vandaag ( 2 juni 2010 ) is hobbytop.nl officeel open gegaan.<a href="#">meer&#8230;</a></p>
                </li>
                <li>
                    <h2>Kalender</h2>
                    <ul>
                        <li><span>10-06-2010</span><a href="actie.html">Leuke actie</a></li>
                        <li><span>02.06.2010</span><a href="#">Website gaat online</a></li>
                    </ul>
                </li>
            </ul>
        </div>
        <!-- end #sidebar -->
        <div style="clear: both;">&nbsp;</div>
    </div>
    <!-- end #page -->
</div>
<div id="footer-content">
    <div class="column1">
        <h2>Nieuwste hobby</h2>
    Hier komt een beetje informatie over de nieuwste hobby op de website</div>
    <div class="column2">
        <ul class="list">
            <h2>top5 nieuwste hobbys</h2>
            <li><a href="computeren.html">Computeren</a></li>
            <li><a href="chillen.html">Chillen</a></li>
            <li><a href="vollybal.html">Vollyballen</a></li>
            <li><a href="voetbal.html">Voetballen</a></li>
            <li><a href="vissen.html">Vissen</a></li>
        </ul>
    </div>
</div>
<div id="footer">
    <p> &copy by hobbytop.nl | alle rechten voor behouden</a>.<SCRIPT LANGUAGE="JavaScript" SRC="http://www.istats.nl/count.php?cid=53598"></SCRIPT></p>
</div>
<!-- end #footer -->
</body>
</html>


Wie kan het invoeggen of vetellen hoe het moet,
M.V.G
Rick
0
Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Hobbytop.nl - Download jou muziek!</title>
<meta name="keywords" content="" />
<meta name="Transient" content="" />
<link href="default.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<!-- start header -->
<div id="logo">
    <h1><a href="index.html">Hobbytop.nl</a></h1>
    <p>Download jou muziek!</p>
</div>
<div id="menu">
    <ul id="main">
        <li class="current_page_item"><a href="index.html">Home</a></li>
        <li><a href="muziek.html">Muziek</a></li>
        <li><a href="overons.html">Over ons</a></li>
        <li><a href="contact.html">Contact</a></li>
</div>
<!-- end header -->
<div id="wrapper">
    <!-- start page -->
    <div id="page">
        <!-- start content -->
        <div id="content">
            <div class="post">
                <h1 class="title"><a>Contact</a></h1>
                <div class="entry">
 [COLOR= #0000BB]<?php
$wie[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]aan[/COLOR][COLOR= #007700]];[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]verzenden[/COLOR][COLOR= #007700]]) {[/COLOR]
  [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][COLOR= #0000BB]$wie[/COLOR][COLOR= #007700]) {
  }[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR] [COLOR= #0000BB]$naar[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$wie[/COLOR][COLOR= #007700]; }[/COLOR]
  [COLOR= #0000BB]$headers[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"From:"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$reply[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
  [URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$naar[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$onderwerp[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700]);[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Je bericht is sucsesvol verzonden!"[/COLOR][COLOR= #007700];
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
?>
<form name="contact" method="post" action="">
<table width="90%"  border="0" cellspacing="0" cellpadding="0">
  <tr bgcolor="#CCCCCC">
    <td colspan="2">&nbsp;</td>
  </tr>
[COLOR= #0000BB]<?[/COLOR]
  [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][COLOR= #0000BB]$wie[/COLOR][COLOR= #007700]) {[/COLOR]
?>  
  <tr>
    <td>Onderwerp:</td>
    <td>
      <select name="naar">
        <option value="mail@hobbytop.nl">optie</option>
        <option value="mail@hobbytop.nl">optie</option>
        <option value="mail@hobbytop.nl">opte</option>
        <option value="mail@hobbytop.nl">optie</option>
        <option value="mail@hobbytop.nl">optie</option>
      </select>
    </td>
  </tr>
[COLOR= #0000BB]<?[/COLOR]
  [COLOR= #007700]}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"
  <tr>
    <td>Aan:</td>
    <td><b>$wie</b></td>
  </tr>"[/COLOR][COLOR= #007700]; }[/COLOR]
?>  
  <tr>
    <td width="30%">Naam:</td>
    <td width="70%">
      <input type="text" name="onderwerp">
    </td>
  </tr>  <tr>
    <td valign="top">Je e-mail:</td>
    <td>
      <input type="text" name="reply">
    </td>
  </tr>  
  </tr>  
  <tr>
    <td valign="top">Bericht:</td>
    <td>
      <textarea name="bericht" cols="50" rows="6"></textarea>
    </td>
  </tr>
  <tr>
    <td colspan="2">
      <input type="submit" name="verzenden" value="Verzenden">
      <input type="reset" name="reset" value="maak veld leeg">
    </td>
  </tr>  
</table></form>
[COLOR= #0000BB]<?[/COLOR]
[COLOR= #007700]}[/COLOR]
?> 
                </div>
            </div>
        </div>

        <!-- end content -->

        <div style="clear: both;">&nbsp;</div>
    </div>
    <!-- end page -->
</div>
<div id="footer">
    <p>&copy; bij mij :-)</p>
</div>
</body>
</html>


ps: probeer wat netter te base je moet nog wel wat veel leren want dit is bager
0
Rickss

Lid · Topicstarter

Berichten
1.601
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
okee bedankt.
0
Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
graag gedaan alleen ik zal die layout wel beter base of door iemand laten base want volgens mij is dit niet xhtml valid en css valid

ps: is het gelukt?
0
Rickss

Lid · Topicstarter

Berichten
1.601
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ik heb de code boven aan aangepas, zodat ik niet een heel nieuw topic hoef te maken.
Maar hoe krijg ik mijn contact nou in mijn layout.?
wil je het misschien even voor doen en zeggen hoe je het gedaan hebt?

M.V.G
Rick
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren