rash44
یک شنبه 18 مرداد 1388, 11:54 صبح
سلام
می خوام زمانی که کاربر هر یک از گزینه های compbox رو انتخاب کرد متن مربوط به همون گزینه از بانک خونده بشه و توی textarea نمایش داده بشه
میدونم که اینکار باید با ajax انجام بشه
لطفا یکی از دوستان اینکار رو برام انجام بده
ممنون
<table border="0" width="100%" dir="rtl" cellpadding="3">
<form method="POST" name="form">
<tr>
<td>
<table border="0" width="100%">
<tr>
<td width="67" bgcolor="#F9F9F9">
<font style="font-size: 9pt; font-weight:700" face="Tahoma" color="#003366">
نوع صفحه :</font></td>
<td>
<select size="1" name="type" class="inputtext">
<option selected value="1" style="background-color: #f9f9f9">صفحه اول وب سایت</option>
<option value="2" style="background-color: #ffffff">صفحه شخصی کارآموز</option>
</select></td>
</tr>
<tr>
<td width="67" bgcolor="#F9F9F9">
<font style="font-size: 9pt; font-weight:700" face="Tahoma" color="#003366">
عنوان :</font></td>
<td>
<textarea rows="3" name="title" cols="27" dir="rtl" class="inputtext"></textarea></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<p align="center">
<input type="submit" value="ثبت" name="button" class="button" onclick="return checkform();"></td>
</tr>
</form>
</table>
<?php
$type=$_POST['type'];
require_once('db.php');
$conect = db_connect();
$sql="SELECT `text` FROM `table` WHERE `type`='$type'";
$result = db_query($sql);
$table=mysql_fetch_array($result);
$text=$table['text'];
?>
می خوام زمانی که کاربر هر یک از گزینه های compbox رو انتخاب کرد متن مربوط به همون گزینه از بانک خونده بشه و توی textarea نمایش داده بشه
میدونم که اینکار باید با ajax انجام بشه
لطفا یکی از دوستان اینکار رو برام انجام بده
ممنون
<table border="0" width="100%" dir="rtl" cellpadding="3">
<form method="POST" name="form">
<tr>
<td>
<table border="0" width="100%">
<tr>
<td width="67" bgcolor="#F9F9F9">
<font style="font-size: 9pt; font-weight:700" face="Tahoma" color="#003366">
نوع صفحه :</font></td>
<td>
<select size="1" name="type" class="inputtext">
<option selected value="1" style="background-color: #f9f9f9">صفحه اول وب سایت</option>
<option value="2" style="background-color: #ffffff">صفحه شخصی کارآموز</option>
</select></td>
</tr>
<tr>
<td width="67" bgcolor="#F9F9F9">
<font style="font-size: 9pt; font-weight:700" face="Tahoma" color="#003366">
عنوان :</font></td>
<td>
<textarea rows="3" name="title" cols="27" dir="rtl" class="inputtext"></textarea></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<p align="center">
<input type="submit" value="ثبت" name="button" class="button" onclick="return checkform();"></td>
</tr>
</form>
</table>
<?php
$type=$_POST['type'];
require_once('db.php');
$conect = db_connect();
$sql="SELECT `text` FROM `table` WHERE `type`='$type'";
$result = db_query($sql);
$table=mysql_fetch_array($result);
$text=$table['text'];
?>