Jump to content

little problem


porko2004

Recommended Posts

<?php
require('config.php');
$sql = "SELECT m.Title as title , f.Reg_URL as reg
        FROM
                website_main as m   
                JOIN               
                website_front as f               
         LIMIT 0,01
              ";


$result = @mysql_query($sql) or die(mysql_error());
echo "<table border='3'>";
echo "<font size='9'><tr> <th><FONT COLOR=red><center>Title</center></font></th> <th><FONT COLOR=red>reg</th> </tr></font>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
   // Print out the contents of each row into a table
$reg = $row['reg'];
      echo "<tr><td bgcolor=''><center>";       
   echo $row['title'];
   echo "</td><td bgcolor=''><center>";
echo '.$reg.';
   echo "</td></tr>"; 
}
?>

 

I got a problem i try to use an attribute for $reg but only appears as .$reg. on website anyone know why?

Parts i have problems with are $reg = $row['reg']; and echo '.$reg.';.

 

thank you

Link to comment
Share on other sites

4 different options:

 

include  -- will include the file, and you can add it more times on same page

require -- does the same but script will not continue if it cannot find the file

include_once -- same as include but will only let you include it once, so no duplications occur

require_once -- same as require, but also just once.

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.