|
|
|
เพื่ม field แล้วแอดข้อมูลไม่ได้ คือว่าผม เพื่ม field แล้วใช้ PHP แอดข้อมูลพอแอดแล้วกด ไปแล้ว |
|
|
|
|
|
|
|
ไม่ค่อย งง ครับ นำ Code ที่เขียนมาด้วย จะดีที่สุดครับ
|
|
|
|
|
Date :
2010-04-14 21:47:34 |
By :
ExCool |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
นำ code แปะเดี๋ยวช่วยแก้ code นะ
|
|
|
|
|
Date :
2010-04-14 22:01:57 |
By :
deathzap |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
สวัสดีครับ
พอแอดแล้วกด ไปแล้ว มันเด้งกลับข้อมูลเดิมตลอดอะครับ ไม่สามารถเพื่มข้อมูลได้เลย
เด้งยังไงครับ
มี Error มั้ย
ถ้าจะให้ดี ขอดู Code + Database เลยครับ
|
|
|
|
|
Date :
2010-04-16 10:16:43 |
By :
winphp |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code
<?
/***********************************************************************/
/* */
/* This file is created by deZender */
/* */
/* deZender (Decoder for Zend Encoder/SafeGuard): */
/* Version: 0.9.3.0 */
/* Author: qinvent.com */
/* Release on: 2005.11.12 */
/* */
/***********************************************************************/
$frm['gid'] = intval ($frm['gid']);
$q = 'select * from hl_groups';
if (!($gsth = mysql_query ($q)))
{
exit (mysql_error ());
;
}
$groups = array ();
while ($grow = mysql_fetch_array ($gsth))
{
array_push ($groups, $grow);
}
echo '<form method=post>
<input type="hidden" name="a" value="add_listing">
<input type="hidden" name="action" value="save">
<input type="hidden" name="gid" value="';
echo $frm['gid'];
echo '">
<input type="hidden" name="p" value="';
echo $frm['p'];
echo '">
<table cellspacing=1 cellpadding=2 border=0 width=100%>
<tr>
<td width=30%>Name:</td><td><input type="text" name="name" value="" class=inpts size=50></td>
</tr>
<tr>
<td>Group:</td>
<td>
';
echo '<s';
echo 'elect name="group_id" class=inpts>
';
foreach ($groups as $group)
{
echo ' <option value="';
echo $group['id'];
echo '" ';
echo ($group['id'] == $frm['gid'] ? 'selected' : '');
echo '>';
echo htmlspecialchars ($group['name']);
echo '</option>
';
}
echo ' </select>
</td>
</tr>
<tr>
<td>Rating:</td>
<td>
';
echo '<s';
echo 'elect name="rating" class=inpts>
';
for ($i = 0; $i <= 5; ++$i)
{
echo ' <option value=';
echo $i;
echo '>';
echo $i;
echo '</option>
';
}
echo ' </select>
</td>
</tr>
<tr>
<td>Hot:</td>
<td>
';
echo '<s';
echo 'elect name="hhot" class=inpts>
';
for ($i = 0; $i <= 3; ++$i)
{
echo ' <option value=';
echo $i;
echo '>';
echo $i;
echo '</option>
';
}
echo ' </select>
</td>
</tr>
<tr>
<td>SSL:</td>
<td>
';
echo '<s';
echo 'elect name="hssl" class=inpts>
<option value=0 selected>No</option>
<option value=1 >Yes</option>
</select>
</td>
</tr>
<tr>
<td>GC licencse</td>
<td>
';
echo '<s';
echo 'elect name="hgc" class=inpts>
<option value=0 selected>No</option>
<option value=1 >Yes</option>
</select>
</td>
</tr>
<tr>
<td>Anti-DDos:</td>
<td>
';
echo '<s';
echo 'elect name="hddos" class=inpts>
<option value=0 selected>No</option>
<option value=1 >Yes</option>
</select>
</td>
</tr>
<tr>
<td>Paidsticky:</td>
<td>
';
echo '<s';
echo 'elect name="paidsticky" class=inpts>
<option value=0 selected>No</option>
<option value=1 >Yes</option>
</select>
</td>
</tr>
<tr>
<td>Allhyip:</td><td><input type="text" name="allhyip" value="" class=inpts size=50></td>
</tr>
<tr>
<td>Status:</td>
<td>
';
echo '<s';
echo 'elect name="status" class=inpts>
<option value=0>Off</option>
<option value=1 selected>On</option>
<option value=2>Not Approved</option>
</select>
</td>
</tr>
<tr>
<td>Paying Status:</td>
<td>
';
echo '<s';
echo 'elect name="hyip_status" class=inpts>
<option value=1>Paying</option>
<option value=2 selected>Waiting</option>
<option value=3>Problem</option>
<option value=4>Not Paying</option>
</select>
</td>
</tr>
<tr>
<td>URL:</td><td><input type="text" name="url" value="" class=inpts size=50></td>
</tr>
<tr>
<td>Banner link:</td><td><input type="text" name="banner" value="" class=inpts size=50></td>
</tr>
<tr>
<td>Percents:</td><td><input type="text" name="percents" value="" class=inpts size=50></td>
</tr>';
echo '
<tr>
<td>Minimal Spend:</td>
<td><input type="text" name="min_spend" value="" class=inpts size=50></td>
</tr>
<tr>
<td>Maximal Spend:</td>
<td><input type="text" name="max_spend" value="" class=inpts size=50></td>
</tr>
<tr>
<td>Referral:</td><td><input type="text" name="referral" value="" class=inpts size=50></td>
</tr>
<tr>
<td>Withdrawal:</td>
<td>
';
echo '<s';
echo 'elect name="withdrawal_type" class=inpts>
<option value=1>Manual</option>
<option value=2>Instant</option>
<option value=3>Automatic</option>
</select>
</td>
</tr>
<tr>
<td>Contact E-mail:</td><td><input type="text" name="email" value="" class=inpts size=50></td>
</tr>
<tr>
<td>Support E-mail:</td><td><input type="text" name="support_email" value="" class=inpts size=50></td>
</tr>
<tr>
<td>Support Fo';
echo 'rm:</td><td><input type="text" name="support_form" value="" class=inpts size=50></td>
</tr>
<tr>
<td>Support Forum:</td><td><input type="text" name="support_forum" value="" class=inpts size=50></td>
</tr>
<tr>
<td>Support Phone:</td><td><input type="text" name="support_phone" value="" class=inpts size=50></td>
</tr>
<tr>
<td>Support AIM:</td><td><input type="text" name="support_aim" value="" class=inpts size=50></td>
</';
echo 'tr>
<tr>
<td>MMG:</td><td><input type="text" name="mmg" value="" class=inpts size=50></td>
</tr>
<tr>
<td>RolClub:</td><td><input type="text" name="rolclub" value="" class=inpts size=50></td>
</tr>
<tr>
<td>TG:</td><td><input type="text" name="tg" value="" class=inpts size=50></td>
</tr>
<tr>
<td>DTM:</td><td><input type="text" name="dtm" value="" class=inpts size=50></td>
</tr>
<tr>
<td>Start Date:</td>';
$date = get_date_arrays ('', '', '', 5, 5);
echo '
<td>
';
echo '<select name="omonth" class=inpts>
';
foreach ($date['MONTHS'] as $data)
{
echo ' <option value="';
echo $data['VALUE'];
echo '" ';
echo ($data['SELECTED'] == 1 ? 'selected' : '');
echo '>';
echo $data['NAME'];
echo '</option>
';
}
echo '
</select>
';
echo '<select name="oday" class=inpts>
';
foreach ($date['DAYS'] as $data)
{
echo ' <option value="';
echo $data['VALUE'];
echo '" ';
echo ($data['SELECTED'] == 1 ? 'selected' : '');
echo '>';
echo $data['NAME'];
echo '</option>
';
}
echo '
</select>
';
echo '<s';
echo 'elect name="oyear" class=inpts>
';
foreach ($date['YEARS'] as $data)
{
echo ' <option value="';
echo $data['VALUE'];
echo '" ';
echo ($data['SELECTED'] == 1 ? 'selected' : '');
echo '>';
echo $data['NAME'];
echo '</option>
';
}
echo '
</select>
</td>
</tr>
<tr>
<td>Added:</td>
';
$date = get_date_arrays ('', '', '', 5, 5);
echo '
<td>
';
echo '<s';
echo 'elect name="month" class=inpts>
';
foreach ($date['MONTHS'] as $data)
{
echo ' <option value="';
echo $data['VALUE'];
echo '" ';
echo ($data['SELECTED'] == 1 ? 'selected' : '');
echo '>';
echo $data['NAME'];
echo '</option>
';
}
echo '
</select>
';
echo '<s';
echo 'elect name="day" class=inpts>
';
foreach ($date['DAYS'] as $data)
{
echo ' <option value="';
echo $data['VALUE'];
echo '" ';
echo ($data['SELECTED'] == 1 ? 'selected' : '');
echo '>';
echo $data['NAME'];
echo '</option>
';
}
echo '
</select>
';
echo '<s';
echo 'elect name="year" class=inpts>
';
foreach ($date['YEARS'] as $data)
{
echo ' <option value="';
echo $data['VALUE'];
echo '" ';
echo ($data['SELECTED'] == 1 ? 'selected' : '');
echo '>';
echo $data['NAME'];
echo '</option>
';
}
echo '
</select>
</td>
</tr>
<tr>
<td>Expires After:</td>
<td><input type="text" name="expiration" value="';
echo htmlspecialchars ($row['expiration']);
echo '" class=inpts size=10> days (enter \'0\' to skip limitation)</td>
</tr>
<tr>
<td>Closed:</td>
';
$date = get_date_arrays ('0', '0', '0', 5, 5);
echo '
<td>
';
echo '<s';
echo 'elect name="cmonth" class=inpts>
<option value=0>-</option>
';
foreach ($date['MONTHS'] as $data)
{
echo ' <option value="';
echo $data['VALUE'];
echo '" ';
echo ($data['SELECTED'] == 1 ? 'selected' : '');
echo '>';
echo $data['NAME'];
echo '</option>
';
}
echo '
</select>
';
echo '<s';
echo 'elect name="cday" class=inpts>
<option value=0>-</option>
';
foreach ($date['DAYS'] as $data)
{
echo ' <option value="';
echo $data['VALUE'];
echo '" ';
echo ($data['SELECTED'] == 1 ? 'selected' : '');
echo '>';
echo $data['NAME'];
echo '</option>
';
}
echo '
</select>
';
echo '<s';
echo 'elect name="cyear" class=inpts>
<option value=0>-</option>
';
foreach ($date['YEARS'] as $data)
{
echo ' <option value="';
echo $data['VALUE'];
echo '" ';
echo ($data['SELECTED'] == 1 ? 'selected' : '');
echo '>';
echo $data['NAME'];
echo '</option>
';
}
echo '
</select>
</td>
</tr>
<tr>
<td valign=top>Payment Systems:</td>
<td>
';
$payments = preg_split ('/\\s*,\\s*/', $settings['payments']);
foreach ($payments as $payment)
{
echo ' <input type="checkbox" name="payments[';
echo $payment;
echo ']" value=1> ';
echo $payment;
echo '<br>
';
}
echo ' </td>
</tr>
<tr>
<td>HYIP E-Gold Accounts:<br>';
echo '<s';
echo 'mall>comma sparated</small></td><td><input type="text" name="account" value="" class=inpts size=10></td>
</tr>
<tr>
<td colspan=2>Description:</td>
</tr>
<tr>
<td colspan=2><textarea name="description" cols=82 rows=5 class=inpts></textarea></td>
</tr>
';
echo '<tr>
<td colspan=2><input type="submit" value="Add" class=sbmt></td>
</tr>
</table>
</form>
';
?>
นี่อะครับโค๊ด
|
|
|
|
|
Date :
2010-04-19 18:22:34 |
By :
zang11015 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|