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'] ." );
while(". $row['row'] ." = mysql_fetch_array(". $row['ad'] ."))
{
". $row['echo1'] ."
". $row['echo2'] ."
}
?>
</textarea>
</label>";
}
else
{
echo"
<table width='439' height='351' border='0'align='center'>
<tr>
<td width='293'><form id='form1' name='form1' method='post' action=''>
<label></label>
Paste Html Here
</td>
<td width='136'> </td>
</tr>
<tr>
<td><textarea name='code' id='code' cols='45' rows='5'></textarea></td>
<td> </td>
</tr>
<tr>
<td><label>
<center> <input type='submit' name='Submit' id='Submit' value='Submit' /></center>
</label> </form></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>";
}
?>
<!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=utf-8" />
<title>New Add</title>
</head>
<body>
</body>
</html>
it does not pull out both just one i am writing the code wrong
thank you
Dealing with code in db query
I am dealing with C code and I need to make sure it is encoded some how to ensure its integrity and then decoded. For security and later readability.
Cron Job and Output
I have php codes running under a cron job.But everytime i output (echo) , it comes out as complete text:THe php script is setup to output some stuff so they are sent to the cron email...but all the
WELCOME SCREEN
first of all let me tell you what does my script do, it´s a very simple query to show a email from a database, (EX: Welcome: user@server.com). i get the email whit the id.
string to currency format
Hi guys...Actually I chunk out some data from txtfile and one of the data contains amount value but in string format like so.."000000010000" -->desire result
MySql timezone
Code: $sql = "SELECT *, date_format(date, '%m/%d/%Y at %I:%i %p' )as date FROM comments WHERE tutorialid='1' ORDER BY commentid DESC LIMIT $offset, $rowsperpage";Can I change the timezone
LOOPing Problem
Hello All!The following code loops through the data and displays the data accordingly. My problem is that the $listPR->HoursWorked; array repeats itself. The foreach($listLocations as
Checking if a process is running (problems including psapi.dll i think...)
Ok, so all I'm trying to do is check if a program is running...
Text to picture Generator
Hello, i have found this script and it works really good^^ But i have one problem, i would like to change the font and font size. Is there anyone here that know what code i should edit/paste in
reading xml faster than DB call?
I am trying to optimize a high traffic website, and I enabled a feature where there are three photos selected from the most recently submitted ones, and displayed at the top of the page. I figured
writing my own sobel filter convolution - something is wrong
I am trying to keep it very simple, I cant see anything wrong with my logic, could anybody help point me to the right direction?!! Code: { int Shorizontal[] = {-1, 0, 1, -2, 0, 2, -1, 0, 1}; int