Vreau sa fac un site PHP simplu
Moderatori: Moderatori, Start Moderator
Vreau sa fac un site PHP simplu
Sal.all..am si eu nevoie de ajutor..vreau sa fac un site php simplutz zic eu..dar pt mine care nu stiu php e greu..si am nevoie de indrumari
Deci de ce am nevoie pt a face un site gen fmro.ro , cms-ul este f greoi pt serverul meu..si pt altele din cate am vazut..oricum eu vreau sa invat php...am luat tutorialul lui oriceon...dar este mai mult programare..adik nu ma invata exact sa fac un admin panel..etc
Deci dupa cum spuneam..designu imi trebuie asemanator cu fmro.ro
cu un modul de download
un modul pt poll
unul pt affiliates
neaparat pt news
un admin panel...
cam asa ar arata siteul meu.....va rog ziceti-mi ce fisiere mi-ar trebui etc...si unde gasesc tutoriale explicite despre cum se face siteul,un admin panel...etc...nu numai programare....
Deci de ce am nevoie pt a face un site gen fmro.ro , cms-ul este f greoi pt serverul meu..si pt altele din cate am vazut..oricum eu vreau sa invat php...am luat tutorialul lui oriceon...dar este mai mult programare..adik nu ma invata exact sa fac un admin panel..etc
Deci dupa cum spuneam..designu imi trebuie asemanator cu fmro.ro
cu un modul de download
un modul pt poll
unul pt affiliates
neaparat pt news
un admin panel...
cam asa ar arata siteul meu.....va rog ziceti-mi ce fisiere mi-ar trebui etc...si unde gasesc tutoriale explicite despre cum se face siteul,un admin panel...etc...nu numai programare....
-
anonim.20CM
- Junior Member
- Mesaje: 44
- Membru din: Mie Sep 13, 2006 6:48 pm
<?php
$db=mysql_connect("localhost","root","");
mysql_select_db("learndb",$db);
if(isset($_POST['add_aff']))
{
$aff_name=$_POST['aff_name'];
$aff_url=$_POST['aff_url'];
$sql = "Insert INTO affiliates (aff_name, aff_url) Values ('$aff_name','$aff_url')";
mysql_query($sql) or die("ERROR: ".mysql_error());
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
background-color: #666666;
}
a:link {
color: #FFFFFF;
}
a:visited {
color: #000000;
}
a:hover {
color: #0099FF;
}
a:active {
color: #0099FF;
}
-->
</style>
</head>
<body>
<div class="Header"><img src="images/header.jpg" alt="header" width="1006" height="153" /></div>
<div id="bar"></div>
<div id="Main">
<div id="Coloana1">
<div class="Module"><span class="news"><img src="images/menu.jpg" alt="img" width="150" height="26" /></span>>><a href="index.html">Home</a><br />
>><a href="/phpBB2">Forum</a><br />
>><a href="downloads.html">Downloads</a><br />
>><a href="mmc.html">MMC</a></div>
<div class="Module2"><img src="images/mmc.jpg" alt="img" width="150" height="26" />
<center>
Nu a inceput
!
</center>
</div>
<div class="Module2"><img src="images/affiliates.jpg" alt="img" width="150" height="26" />
<center><?php
$result=mysql_query("SELECT * FROM affiliates");
while($myrow=mysql_fetch_array($result))
{
echo '<a href='.$myrow['aff_url'].'>'.$myrow['aff_name'].'</a>';}?></center>
</div>
</div>
<div id="Coloana2">
<img src="images/affiliates_l.jpg" alt="bar" width="670" height="26" />
<div class="post"><img src="images/img12.gif" alt="img" width="670" height="26" /><br />
<center>
<form method="post">
Name :
<input name="aff_name" type="text" maxlength="200" /></center>
<center>
URL :
<input name="aff_url" type="text" maxlength="200" /></center>
<center>
<input name="add_aff" type="submit" value="Submit" /></center></form>
</div>
</div>
<div id="Coloana3">
<div class="Module"><img src="images/dfp.jpg" alt="img" width="150" height="26" />
<center>
<img src="images/logo.jpg" alt="logo" height="125" />
</center>
<center>
CountDown
</center>
</div>
<div class="Module2"><img src="images/poll.jpg" alt="img" width="150" height="26" />Va place Siteul?<br />
Da
<input name="1" type="radio" value="" />
<br />
Nu
<input name="1" type="radio" value="" />
</div>
<div class="Module2"><img src="images/administration.jpg" alt="img" width="150" height="26" />Administrator Log In<br />
User:
<input name="User" type="text" maxlength="15" />
<br />
Parola:
<input name="User" type="text" maxlength="15" />
<br />
<br />
<center>
<input name="submit2" type="submit" value="Log In" />
</center>
</div>
</div>
</div>
</body>
</html>
sa-mi spui daca mere
$db=mysql_connect("localhost","root","");
mysql_select_db("learndb",$db);
if(isset($_POST['add_aff']))
{
$aff_name=$_POST['aff_name'];
$aff_url=$_POST['aff_url'];
$sql = "Insert INTO affiliates (aff_name, aff_url) Values ('$aff_name','$aff_url')";
mysql_query($sql) or die("ERROR: ".mysql_error());
header("Location: ".$_SERVER['PHP_SELF']);
exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
background-color: #666666;
}
a:link {
color: #FFFFFF;
}
a:visited {
color: #000000;
}
a:hover {
color: #0099FF;
}
a:active {
color: #0099FF;
}
-->
</style>
</head>
<body>
<div class="Header"><img src="images/header.jpg" alt="header" width="1006" height="153" /></div>
<div id="bar"></div>
<div id="Main">
<div id="Coloana1">
<div class="Module"><span class="news"><img src="images/menu.jpg" alt="img" width="150" height="26" /></span>>><a href="index.html">Home</a><br />
>><a href="/phpBB2">Forum</a><br />
>><a href="downloads.html">Downloads</a><br />
>><a href="mmc.html">MMC</a></div>
<div class="Module2"><img src="images/mmc.jpg" alt="img" width="150" height="26" />
<center>
Nu a inceput
!
</center>
</div>
<div class="Module2"><img src="images/affiliates.jpg" alt="img" width="150" height="26" />
<center><?php
$result=mysql_query("SELECT * FROM affiliates");
while($myrow=mysql_fetch_array($result))
{
echo '<a href='.$myrow['aff_url'].'>'.$myrow['aff_name'].'</a>';}?></center>
</div>
</div>
<div id="Coloana2">
<img src="images/affiliates_l.jpg" alt="bar" width="670" height="26" />
<div class="post"><img src="images/img12.gif" alt="img" width="670" height="26" /><br />
<center>
<form method="post">
Name :
<input name="aff_name" type="text" maxlength="200" /></center>
<center>
URL :
<input name="aff_url" type="text" maxlength="200" /></center>
<center>
<input name="add_aff" type="submit" value="Submit" /></center></form>
</div>
</div>
<div id="Coloana3">
<div class="Module"><img src="images/dfp.jpg" alt="img" width="150" height="26" />
<center>
<img src="images/logo.jpg" alt="logo" height="125" />
</center>
<center>
CountDown
</center>
</div>
<div class="Module2"><img src="images/poll.jpg" alt="img" width="150" height="26" />Va place Siteul?<br />
Da
<input name="1" type="radio" value="" />
<br />
Nu
<input name="1" type="radio" value="" />
</div>
<div class="Module2"><img src="images/administration.jpg" alt="img" width="150" height="26" />Administrator Log In<br />
User:
<input name="User" type="text" maxlength="15" />
<br />
Parola:
<input name="User" type="text" maxlength="15" />
<br />
<br />
<center>
<input name="submit2" type="submit" value="Log In" />
</center>
</div>
</div>
</div>
</body>
</html>
sa-mi spui daca mere
Ultima oară modificat Lun Ian 22, 2007 2:38 pm de către MihaiC, modificat 1 dată în total.
Dev @
scuze pt double-post....deci am incercat chestia aia..si acolo und trebuia formular..am bagat codu html de la coloana2 k acolo e formularul ..dar dak eu bagai numai coloana2 ...siteul nu imi va afisa numai coloana2 si restu "modulelor" nu?
PS ..am incercat si siteul fara sa introduc nimik..cum il dechid imi afiseaza coloana 2 imediat sub restul modulelor...si dak adaug si dupaia dau refresh acelasi lucru
PS nou..acu incerc
PS ..am incercat si siteul fara sa introduc nimik..cum il dechid imi afiseaza coloana 2 imediat sub restul modulelor...si dak adaug si dupaia dau refresh acelasi lucru
PS nou..acu incerc
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 22 vizitatori

