إستفسار بخصوص لغة php
المشرف: alhitary
قوانين المنتدى
هذا المنتدى عام جداً ويمنع طلب الدعم الفني أو ما يخص phpBB فقط نقاشات عامة تهم أصحاب المنتديات، كذلك يمنع بتاتاً إضافة المواضيع المتعلقه بالهكر، الكراك، السيريلات، البروكسي
هذا المنتدى عام جداً ويمنع طلب الدعم الفني أو ما يخص phpBB فقط نقاشات عامة تهم أصحاب المنتديات، كذلك يمنع بتاتاً إضافة المواضيع المتعلقه بالهكر، الكراك، السيريلات، البروكسي
- harede2006
- عضو متميز
- مشاركات: 232
- اشترك في: الجمعة مايو 05, 2006 2:33 am
??????? ????? ??? php
?????? ?????
??? ?? ??????? ?? ??? ?? ????? ????? ??? ????? ???????? ?????? ???? ?? ?????? ???????? ? ????? ?????? ?????
?????? ???? ??????? ???? ?? ??? ???? ??? ??????? ?????? ??? ????? ??????? ????? ??? ???? ?????
????? ????
show.php ???? ???? ????? ??????
??? ?????? ??? ????? ????????
<table border='1' width='100%' id='table1'>
??????? ?? ??? ??? ????? ?? ???? ?? ??? ???????? ?? ???? ????? ?? ????? ???????? ??? ???? ???????? ??????
??? ?? ??? show ???? ????? while ???? ???? ???? ????? ????? while ??? ??? ?????? ??? ??? ???
??? ?? ??????? ?? ??? ?? ????? ????? ??? ????? ???????? ?????? ???? ?? ?????? ???????? ? ????? ?????? ?????
?????? ???? ??????? ???? ?? ??? ???? ??? ??????? ?????? ??? ????? ??????? ????? ??? ???? ?????
????? ????
show.php ???? ???? ????? ??????
كود: تحديد الكل
<?php
include('easytemplate.php');
$con=mysql_connect("localhost","root","="); //SQL??????? ?? .
if(!$con)
{
die('can not connect'.mysql_error());
}
mysql_select_db( site , $con );
$result = mysql_query("select * from post");
$num = mysql_num_rows($result);
$i=0;
while( $i < $num ) {
$post_id = mysql_result( $result , $i , "post_id" );
$title = mysql_result( $result , $i , "title" );
$data = mysql_result( $result , $i , "data" );
++$i;
}
$tmpl = new EasyTemplate('style','cache');
print $tmpl->display('body/showpost_body.html');
mysql_close($con);
?>
<table border='1' width='100%' id='table1'>
كود: تحديد الكل
<tr>
<td width='5%'>{post_id}</td>
<td width='44%'>{title} </td>
<td width='20%'>{data}</td>
<td width='10%'> <a href='edit.php?id=$post_id'> [Edit] </a> </td>
<td width='10%'> <a href='del.php?id=$post_id'>[delete] </a> </td>
</tr>
</table>
??????? ?? ??? ??? ????? ?? ???? ?? ??? ???????? ?? ???? ????? ?? ????? ???????? ??? ???? ???????? ??????
??? ?? ??? show ???? ????? while ???? ???? ???? ????? ????? while ??? ??? ?????? ??? ??? ???
- harede2006
- عضو متميز
- مشاركات: 232
- اشترك في: الجمعة مايو 05, 2006 2:33 am
??????? ????? ??? php
???? ???? ?? ?????? ??? ????????
????:
???? ????? ?????? ?????? ?????? ????? ??? ??????
http://daif.net/easy/?name=loop
????:
???? ????? ?????? ?????? ?????? ????? ??? ??????
http://daif.net/easy/?name=loop
?????? ?? ??????? LOOP ????? ???? ???? ????? ??? ?? ??? ????? ???? ?? ????? ??? ???? ??? ??? ????? ???????? ?? ????? ??????? ?? ????? ??????? , ???? ??? ????? ??????? ??? ???????? ?? ??? ???? ??????? SQL ??? ??????? ???? ??????? ????? ???? ??? ???? ????? ?????? ??? ??????? LIMIT ???? ???? ??? ??? ??????? ?? ?????? ??????? ???? ????? ????? ?????? ???? ??????? ?? ??????? NAME ???? ???? _paging ?????? ??? ????? ???? ??????? ???? ??? ?? ????? 1 ??? ??? ??????? .
?????? ?????? ?? ??? ????? ?????? ????? ??? 9 ????? ?? ???? ????? ??? ?????? ???? ??? id ? name ??? ???? ??? html ??? ??????? ??? ???????? ?????? ????? ??? ??? ??????? ??? ?? ????? ?????? ???.?
كود: تحديد الكل
<?
for($i=0;$i<=5;$i++){
$rows[] = array('id'=>$i,'name'=>'name'.$i);
}
?>
كود: تحديد الكل
html
<LOOP NAME="{rows}">
{rows.id} - {rows.name}
</LOOP>
</IF>
كود: تحديد الكل
result
1 - name1
2 - name2
3 - name3
4 - name4
5 - name5
- harede2006
- عضو متميز
- مشاركات: 232
- اشترك في: الجمعة مايو 05, 2006 2:33 am
??????? ????? ??? php
?? ??????? ???? ..
???? ?? ????? ???????? ???? ???? ?? ????? ???? ??? ????? ????? ??
?? ?????? ???????? ?????? ???? ?? ??? ??? ?????? ?? ?? ???
??????? ????? ???? ???????? ??? ???? ??? ????? ???? ????? ?? ???
??? ???? ??? ????? ???????? ????? ??????
??? ???? ?? ????? ??? ?????? ??? ?? ???? ? ???? ???? ?? ?????? ???????? ?????? ?
------
???? ?? ????? ???????? ???? ???? ?? ????? ???? ??? ????? ????? ??
?? ?????? ???????? ?????? ???? ?? ??? ??? ?????? ?? ?? ???
??????? ????? ???? ???????? ??? ???? ??? ????? ???? ????? ?? ???
??? ???? ??? ????? ???????? ????? ??????
كود: تحديد الكل
$post_all = "SELECT forum_id , name,img,des FROM forum WHERE forum_id= ???" ;
------
-
- عضو شرف
- مشاركات: 703
- اشترك في: الثلاثاء يوليو 11, 2006 3:36 pm
- مكان: مصر ام الدنيا
- اتصال:
??????? ????? ??? php
??? ???? ???? ??? ???? ??? ?? ??? ??? ????? ?? ???? ??????? ???????? ??? ???? ??? ????? ????? ?? ??? 5
m
MY WORLD
m
under construction
still under-develop v 0.05 ! see what happen

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me


under construction
still under-develop v 0.05 ! see what happen

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me
- harede2006
- عضو متميز
- مشاركات: 232
- اشترك في: الجمعة مايو 05, 2006 2:33 am
??????? ????? ??? php
?????? ??? ???? ?????? ???? ???????? ????? ???????
?? ????? ???? ????? ????? ????? ?? ???? ???????? ??? ????? ?????
??? ??? ??????? ?? ????? ?? ?????? ????? ????????
?? ????? ???? ????? ????? ????? ?? ???? ???????? ??? ????? ?????
??? ??? ??????? ?? ????? ?? ?????? ????? ????????
-
- عضو شرف
- مشاركات: 703
- اشترك في: الثلاثاء يوليو 11, 2006 3:36 pm
- مكان: مصر ام الدنيا
- اتصال:
??????? ????? ??? php
????? ????? ??? ???????? ?? ???? ??????? .
???? ???????? ????? ??? ??? ????? ???
???? ???????? ????? ??? ?? ?? ????? , ????? ??????? ????? ??? ?? ?? ???? ????? ?????? ?????
???? ????? ????? ??? ??? ??? ????? ???????? ?? ???? ???????? , ???? ??????? ????? ??? ???????? ??? ?????? ????? ??? .
???? ???????? ????? ??? ??? ????? ???
???? ???????? ????? ??? ?? ?? ????? , ????? ??????? ????? ??? ?? ?? ???? ????? ?????? ?????
???? ????? ????? ??? ??? ??? ????? ???????? ?? ???? ???????? , ???? ??????? ????? ??? ???????? ??? ?????? ????? ??? .
m
MY WORLD
m
under construction
still under-develop v 0.05 ! see what happen

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me


under construction
still under-develop v 0.05 ! see what happen

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me
- harede2006
- عضو متميز
- مشاركات: 232
- اشترك في: الجمعة مايو 05, 2006 2:33 am
??????? ????? ??? php
??? ???? ???? ??? ????? ???? ???? ???????? ????? ??? ???????? ????? ??????? ??? ????? ???? ?? ??????? ???????? ????? ??? ?? ?? ????? , ????? ??????? ????? ??? ?? ?? ???? ????? ?????? ?????
??? ???? ???? ?? ??? ????? ????? ????
???? ??? ????? ?? ?????? ???????? ???? ????? ??????? ?????? ??? ???? ?? ???????? ???? ????
?? ???? ?
??? ????????? ?? ????? ???????? ????? ????? ??????? ??? ????? ???????? ?
???? ????? ???????? ??? ???? ??? ????? ???? ???? ?? ????? ??? ??? ???? ???? ???? ????? ???? ?????? ??????
???? ???????? ???? ?? ?????? ????? ?? ??????? ?
???? ??? ????? ?????? ???? ???? ??????? ???? ?????? ????? ???????? ???????? ????? ????? ?? ????? ???? ????? ????? ?????? ???? ??????? ????? ???????? ????? ?????? ????? ????? ???????? ?? ???? ???????? ??? ??? ???? ??? ?? ????? ????? ????? ????? ?? ????? ??????? ?? ????
-
- عضو شرف
- مشاركات: 703
- اشترك في: الثلاثاء يوليو 11, 2006 3:36 pm
- مكان: مصر ام الدنيا
- اتصال:
??????? ????? ??? php
???? : ??? ?? ???? 3 ??? ??? ?? ??? ???? sql ???? ???????? ????? ??? , ?? ?? ???? 5 ?????? ?? ?? ??? ???? ???? select ????? ??????? ???? ??? ????? ????? sql ???? ??? ???? ?????? ???? ?????harede2006 كتب:???? ???????? ???? ?? ?????? ????? ?? ??????? ?
??? ????? ???? ???? row ?? ??? ????? ???? ?????? ????? LEFT JOIN
http://www.w3schools.com/sql/sql_join_left.asp
???? ?? : ??? ??? ????? ??? ??? ????? ??? ????? ?????? ?? ????? ??? ????? ??? ??????? ?
m
MY WORLD
m
under construction
still under-develop v 0.05 ! see what happen

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me


under construction
still under-develop v 0.05 ! see what happen

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me
- harede2006
- عضو متميز
- مشاركات: 232
- اشترك في: الجمعة مايو 05, 2006 2:33 am
??????? ????? ??? php
?????? ?????
?? ??? ?????? ???? ??? ????? ??? ?????? ?? ?????? ??? ??? ???? ??? ?? ??? ???? ??? ???? ?????? ?? ?????? ????????
?? ??????? ????
???? ???? ?????? ??????? ??????? ????? ???? ?? ??? ??????? ??? ????? ????????
???? ???? ?????? ?? ??? ????? ?????? ???? ???? ????? ????? ??? ????? ??? ????? ?? ?? ??? php ?? ?? html
???????? ??????? ??? ????? ????? ???? ????? ?????? ?? ???? ????? ???
??? ???? ??????? ?? ???? ??? ?????? ???? ?? php
?? ??? ?????? ???? ??? ????? ??? ?????? ?? ?????? ??? ??? ???? ??? ?? ??? ???? ??? ???? ?????? ?? ?????? ????????
?? ??????? ????
???? ???? ?????? ??????? ??????? ????? ???? ?? ??? ??????? ??? ????? ????????
???? ???? ?????? ?? ??? ????? ?????? ???? ???? ????? ????? ??? ????? ??? ????? ?? ?? ??? php ?? ?? html
???????? ??????? ??? ????? ????? ???? ????? ?????? ?? ???? ????? ???
??? ???? ??????? ?? ???? ??? ?????? ???? ?? php
كود: تحديد الكل
<?php
session_start();
if(!$_SESSION['username']){
echo "<font color=\"#FF0000\"><b>please log in <META HTTP-EQUIV=\"refresh\" CONTENT=\"1; URL=login.php\"></b></font>";
exit;
}
include('easytemplate.php');
$con=mysql_connect("localhost","root","");
if(!$con){
die('can not connect'.mysql_error());
}
mysql_select_db( site , $con );
if (isset($_POST['newpost'])){
if($title == "" || $img == "" || $data == "" ) {
die("<b>??? ???? ???/???? ?????</b>");
}
$sql="INSERT INTO post (title, img, data, forum_id) VALUES ('$_POST[title]','$_POST[img]','$_POST[data]','$_POST[forum_id]')";
if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }
$post_id = "SELECT post_id FROM post ORDER BY post_id DESC LIMIT 1" ;
}
if (isset($_POST['edit'])){
if($title == "" || $data == "" || $img_post == "" ) {
die("<b>??? ???? ???/???? ?????</b>");
}
$query_post2 = "update post set title='$title', img='$img_post',data='$data' where post_id='$post_id'";
mysql_query($query_post2);
$query_forum2 = "update forum set name='$name', des='$des', img='$img_forum' where forum_id='$forum_id'";
mysql_query($query_forum2);
}
$tmpl = new EasyTemplate('style','cache');
print $tmpl->display('body/inserted_body.html');
mysql_close($con);
?>
كود: تحديد الكل
<INCLUDE NAME="body/header_body.html">
<table border="0" width="100%" bordercolorlight="#000000" style="border-collapse: collapse" cellpadding="4">
<tr>
<td>
<IF NAME="{newpost}">
<p align="center">?? ????? ??????? ?????</p>
<p align="center"><LOOP NAME="{rows}" SQL="{post_id}" LIMIT="1"><a href="showpost.php?id={rows.post_id}">???? ??? ??????? ???????</a></LOOP></p>
</IF>
<IF NAME="{edit}">
<p align="center">?? ????? ??????? ?????</p><p align="center"><a href="showpost.php?id={post_id}">???? ??? ??????? ???????</a></p>
</IF>
</td>
</tr>
</table>
<INCLUDE NAME="body/footer_body.html">
-
- عضو شرف
- مشاركات: 703
- اشترك في: الثلاثاء يوليو 11, 2006 3:36 pm
- مكان: مصر ام الدنيا
- اتصال:
??????? ????? ??? php
?? ????? ?? ????? ??? ?????? ?harede2006 كتب:?? ??? ?????? ???? ??? ????? ??? ?????? ?? ?????? ??? ??? ???? ??? ?? ??? ???? ??? ???? ?????? ?? ?????? ????????
?? ??????? ??? ??? ?????? ?? ??? ??????.
????????? ?????? : ???? ?????? ???? ???????????
m
MY WORLD
m
under construction
still under-develop v 0.05 ! see what happen

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me


under construction
still under-develop v 0.05 ! see what happen

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me
- harede2006
- عضو متميز
- مشاركات: 232
- اشترك في: الجمعة مايو 05, 2006 2:33 am
??????? ????? ??? php
?????? ????? ????? ???? ???????
???? ????? ?????
????? ??? ??? ???????? ?? ?????? ????? ??? ????? ????? ?????? ??????? ?????
???? ??? ??? ???????
?????? ???? ???? ??? ??? ??????? ?????? ???? ??? ?????? ??? ??? ????? ??? ???? ?? ????? ???? ????? ?????
????? ????? ?????? ??????? ?????? ??? ?? ????????? ????
???? ????? ?????
????? ??? ??? ???????? ?? ?????? ????? ??? ????? ????? ?????? ??????? ?????
???? ??? ??? ???????
?????? ???? ???? ??? ??? ??????? ?????? ???? ??? ?????? ??? ??? ????? ??? ???? ?? ????? ???? ????? ?????
????? ????? ?????? ??????? ?????? ??? ?? ????????? ????
-
- عضو شرف
- مشاركات: 703
- اشترك في: الثلاثاء يوليو 11, 2006 3:36 pm
- مكان: مصر ام الدنيا
- اتصال:
??????? ????? ??? php
??? ???? ?????? ????? ??? ?? ??? ??? ?? ?????? ????harede2006 كتب:?????? ????? ????? ???? ???????
???? ????? ?????
????? ??? ??? ???????? ?? ?????? ????? ??? ????? ????? ?????? ??????? ?????
???? ??? ??? ???????
?????? ???? ???? ??? ??? ??????? ?????? ???? ??? ?????? ??? ??? ????? ??? ???? ?? ????? ???? ????? ?????
????? ????? ?????? ??????? ?????? ??? ?? ????????? ????

m
MY WORLD
m
under construction
still under-develop v 0.05 ! see what happen

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me


under construction
still under-develop v 0.05 ! see what happen

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me
- harede2006
- عضو متميز
- مشاركات: 232
- اشترك في: الجمعة مايو 05, 2006 2:33 am
??????? ????? ??? php
?? ?? ???? ??????? ???????
?????? ?????? ???? ???? ?? ???? ???????
????? ??? ??? ????? ??? ??????
??? ???? ??? ????? ????? ???? ???? ?? ?? ??? ?? ?????? ???? ???? ??? ??? ?? ??? ????
??? ????? ????? ???? ?? ??????? ?????? ????? ???? ??? ??? ????? ?? ??? ??????? ???? ???? ?? ???? ?????? ??? ???? ????? ??? ??? ??????? ?? ???? ??? ???? ????? ?? ???? ??????
?????? ???????
????? ????? ??????? ?? ????? ?????? ??? ?????? ???? ??? ????
??? ????? ???? ????? ??? ??????? ?????? ????? ?? ?????
?? ???? ??????
http://harede.0fees.net/a/
http://harede.0fees.net/a/admin
medo
test
?????? ?????? ??? ????? ???? ??????? ?? ???? ????? ??? ???? ????? ???? ??? ?????? ???? ?? ?? ?? ?????? ????? ???
?????? ?????? ???? ???? ?? ???? ???????
????? ??? ??? ????? ??? ??????
??? ???? ??? ????? ????? ???? ???? ?? ?? ??? ?? ?????? ???? ???? ??? ??? ?? ??? ????
??? ????? ????? ???? ?? ??????? ?????? ????? ???? ??? ??? ????? ?? ??? ??????? ???? ???? ?? ???? ?????? ??? ???? ????? ??? ??? ??????? ?? ???? ??? ???? ????? ?? ???? ??????
?????? ???????
????? ????? ??????? ?? ????? ?????? ??? ?????? ???? ??? ????
??? ????? ???? ????? ??? ??????? ?????? ????? ?? ?????
?? ???? ??????
http://harede.0fees.net/a/
http://harede.0fees.net/a/admin
medo
test
?????? ?????? ??? ????? ???? ??????? ?? ???? ????? ??? ???? ????? ???? ??? ?????? ???? ?? ?? ?? ?????? ????? ???

-
- عضو شرف
- مشاركات: 703
- اشترك في: الثلاثاء يوليو 11, 2006 3:36 pm
- مكان: مصر ام الدنيا
- اتصال:
??????? ????? ??? php
???? ????? ????? 

m
MY WORLD
m
under construction
still under-develop v 0.05 ! see what happen

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me


under construction
still under-develop v 0.05 ! see what happen

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me
- harede2006
- عضو متميز
- مشاركات: 232
- اشترك في: الجمعة مايو 05, 2006 2:33 am
??????? ????? ??? php
?????? ?????
?? ??? ??????? ??? ???? ?????? ???? ????? ???? ????? ???????? ????? ?? inserted.php
?? ??? ??????? ??? ???? ?????? ???? ????? ???? ????? ???????? ????? ?? inserted.php
كود: تحديد الكل
<?php
session_start();
if(!$_SESSION['username']){
echo "<font color=\"#FF0000\"><b>please log in <META HTTP-EQUIV=\"refresh\" CONTENT=\"1; URL=login.php\"></b></font>";
exit;
}
include('../config.php');
include('../easytemplate.php');
$con = mysql_connect("$hostname","$user","$pass");
if(!$con){
die('can not connect'.mysql_error());
}
mysql_select_db($db_name,$con);
if (isset($_POST['newpost'])){
if($title == "" || $img == "" || $data == "" ) {
die("<b>??? ???? ???/???? ?????</b>");
}
$sql="INSERT INTO post (title, img, small_data, data, forum_id) VALUES ('$_POST[title]','$_POST[img]','$_POST[small_data]','$_POST[data]','$_POST[forum_id]')";
if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }
$post_id = "SELECT post_id FROM post ORDER BY post_id DESC LIMIT 1" ;
}
if (isset($_POST['edit'])){
if($title == "" || $data == "" || $img == "") {
die("<b>??? ???? ???/???? ?????</b>");
}
$query_post2 = "update post set title='$title', small_data = '$small_data', img='$img',data='$data' ,forum_id='$forum_id' where post_id='$post_id'";
mysql_query($query_post2);
}
$tmpl = new EasyTemplate('style','cache');
print $tmpl->display('body/inserted_body.html');
mysql_close($con);
?>
الموجودون الآن
المتصفحون للمنتدى الآن: لا يوجد أعضاء مسجلين متصلين و 8 زوار