i am having a problem with a while statement here is the code Code: [Select]<?php session_start(); if(!session_is_registered(username)){ header('location:login.php'); } ?> <?php
include'db.php'; // Php Suubmit if and mysql insert if(isset($_POST['Submit'])) { $code=$_POST['code']; mysql_query("INSERT INTO Ads (id, Html) VALUES( NULL, '$code' ) ") or die(mysql_error()); // pull out code $result = mysql_query("SELECT * FROM Code WHERE id='1'");
while($row = mysql_fetch_array($result)) //find ad id $res = mysql_query("SELECT * FROM Ads WHERE html='$code'"); while($row1 = mysql_fetch_array($res))
echo"
<label> <textarea name='paste_code' id='paste_code' cols='100' rows='5'> <?php include 'db.php';
". $row['ad'] ." = mysql_query(". $row['lick'] ." SELECT * FROM Ads WHERE id='". $row1['id'] ." '". $row['lick'] ." );