Jump to content

Prev. 1|2|3 Next


avatar.alex

Recommended Posts

ok I am trying to create a script that manages my layout system on my site ok and I would like the page to display 10 layouts on the page at once so how would I get it to do so. This is the code please help me:

 

P.S. If I add a table to the information for example.

echo "<b>layimage:</b> $layimage<br>";
echo "<b>authname:</b> $authname<br>";
echo "<b>authurl:</b> $authurl<br>";
echo "<b>layname:</b> $layname<br>";
echo "<b>preurl:</b> $preurl<br>";
echo "<b>downurl:</b> $downurl<br>";
echo "<a href=\"update.php?id=$id\">Update</a> - <a href=\"delete.php?id=$id\">Delete</a>";
echo "<br><br>";

and delete all the text and insert a table will that tabe show up each time I submit a layout or will all the laouts be cramed into one table.

 

 

 

<a href="add.html">Add entry</a><br>
<br>
<?php

include("connect.php");

$query="SELECT * FROM lms ";
$result=mysql_query($query);
$num = mysql_num_rows ($result);
mysql_close();

if ($num > 0 ) {
$i=0;
while ($i < $num) {
$layimage = mysql_result($result,$i,"layimage");
$authname = mysql_result($result,$i,"authname");
$authurl = mysql_result($result,$i,"authurl");
$layname = mysql_result($result,$i,"layname");
$preurl = mysql_result($result,$i,"preurl");
$downurl = mysql_result($result,$i,"downurl");
$id = mysql_result($result,$i,"id");

echo "<b>layimage:</b> $layimage<br>";
echo "<b>authname:</b> $authname<br>";
echo "<b>authurl:</b> $authurl<br>";
echo "<b>layname:</b> $layname<br>";
echo "<b>preurl:</b> $preurl<br>";
echo "<b>downurl:</b> $downurl<br>";
echo "<a href=\"update.php?id=$id\">Update</a> - <a href=\"delete.php?id=$id\">Delete</a>";
echo "<br><br>";

++$i; } } else { echo "The database is empty"; }?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.