Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Displaying Table In Php Code


I have a PHP script that has a drop down to select a record, then it should display some text from a database and then display a table of information below it. But, the table is displaying at the top instead. Code:




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Displaying Code
I'm trying to build a help file for my web application that includes displaying some of the actual code in the app. Whenever I submit code to the database with form I'm using it behaves like its part of the application.

If the code is wrapped in <??> it doesn't even display on the web page. I tried using <? but when I update the record, it converts to <? and the code disappears again. Is there some code I can wrap everything in to display my script properly?

PHP Code Not Displaying In IE 6
I'm a newbie to PHP and am have problems getting simple PHP page
(php_test_page.php) to display correctly. The page is:

<html>

<body>

<H1>Test Line 1</h1>

<?PHP echo '<H1>Test Line 2</h1>' ?>

</body>

</html>

Test Line 1 displays fine by not the PHP line. If I look at the source with
the browser (IE 6), the line is still there.

I'm not sure if the following is the problem. I might have two problems
here. However, my default web server is not running and I can't seem to
start it. The following is the scenario with XP Professional:

- Click Control Panel

- Click Performance and Maintenance

- Click Administrative Tools

- Double Click Computer Management

- Open Services and Applications

- Open Internet Information Services

- Open Web Sites

- The "Default Web Site" is has a red error sign is marked as
stopped. Clicking "Default Web Site" and click "Start" yield an error dialog
with the following message. "Unexpected error 0x8ffe2740 occurred."

Displaying PHP Source Code
What dictates that .phps files display source code?

I have two examples, one where it all works as expected and one where it doesn't .... and it's really confusing.

Displaying # Of Records In A Table
Can anyone throw me a link to some prefab code, or a tutorial on how I can get a page to display the number of records that meet a certain criteria.

example:
I have a page that stores information on audio FX. I'd like to include a feature that would let the users know how many items are in a particular section.

Player (10)
Items (5)
Weapons (0)
etc.

All help appreciated,

Displaying A HTML Table With PHP
I'm new to PHP and I'm trying to get my head around databases at the moment. So far I have a page that kinda takes the mickey and takes a few details from you, it then creates a cookie that can be removed later. It also prompts you to add the data you gave to a database.

All this works perfectly, but when it comes to displaying the results of the database, all I can show is the first entry in the table. Can someone please tell me how I'm supposed to see all of them?

I've read other articles but they don't make much sense to me.

BTW, the database details are as follows:

Database name: visualanteorg
Table name: people
Fields: id, name, shoe_size, job

As you will see if you choose to look at the pages, getting the information out is not a problem, it's just formatting it how I want it, so each entry appears under the other in the table.

Scrips Not Running, Only Displaying Code
I installed Apache, mySql, and php. I go to my server folder and run one of the php scripts that is needed to install oscommerce. IDK whats going on but the brower (firefox) will only display the code and won't run the actually script.

Grabbing Data From A Table And Displaying It
I'm grabbing data from a table and displaying it but I want to to spand out into multiple pages...I got it all setup but when I click on the next link nothing happens... I got it setup at "3" right now just for testing..I have 5 entries in the database.. anyways could someone help me out? here is the code:

<?php

// Get connection info
include "../connect.php";
// End connection info
if(!$rowstart) $rowstart=0;
// Start database select
$result = mysql_query(
"SELECT * FROM links WHERE notactive='$notactive' order by date desc limit $rowstart,3"); //Select Database
$result2 = mysql_query("select * from links");
if (!$result) {
echo("<P>Error performing query: " .
mysql_error() . "</P>"); exit(); }
// Display the text of each host
while ( $row = mysql_fetch_array($result) ) {
if ($notactive = 1) {
echo ("<table width=500 height=57 border=0 cellpadding=0 cellspacing=0>");
echo ("<tr>");
echo ("<td align=left valign=top><strong>" . $row["name"] . "</strong></td>");
echo ("</tr>");
echo ("<tr>");
echo ("<td align=left valign=top>" . $row["desc"] . "</td>");
echo ("</tr>");
echo ("<tr>");
echo ("<td align=left valign=top><a href=" . $row["url"] . ">". $row["url"] ."</a></td>"); }
echo ("</tr>");
echo ("<br><br>");
echo ("</table>");
}
if ($rowstart>$numrows)
{
echo "<A HREF=$php_self?rowstart=rowstart-3>";
echo "< Previous Page</A>";
}
echo "|";
$numrows=mysql_num_rows($result2);
if($rowstart+3<$numrows)
{
echo "<A HREF='$php_self?$rowstart=rowstart+3'>Next Page></A>";
}
?>

Grabbing Data From A Table And Displaying It
I'm grabbing data from a table and displaying it but I want to to spand out into multiple pages...I got it all setup but when I click on the next link nothing happens... I got it setup at "3" right now just for testing..I have 5 entries in the database.. anyways could someone help me out? here is the code:

<?php

// Get connection info
include "../connect.php";
// End connection info
if(!$rowstart) $rowstart=0;
// Start database select
$result = mysql_query(
"SELECT * FROM links WHERE notactive='$notactive' order by date desc limit $rowstart,3"); //Select Database
$result2 = mysql_query("select * from links");
if (!$result) {
echo("<P>Error performing query: " .
mysql_error() . "</P>"); exit(); }
// Display the text of each host
while ( $row = mysql_fetch_array($result) ) {
if ($notactive = 1) {
echo ("<table width=500 height=57 border=0 cellpadding=0 cellspacing=0>");
echo ("<tr>");
echo ("<td align=left valign=top><strong>" . $row["name"] . "</strong></td>");
echo ("</tr>");
echo ("<tr>");
echo ("<td align=left valign=top>" . $row["desc"] . "</td>");
echo ("</tr>");
echo ("<tr>");
echo ("<td align=left valign=top><a href=" . $row["url"] . ">". $row["url"] ."</a></td>"); }
echo ("</tr>");
echo ("<br><br>");
echo ("</table>");
}
if ($rowstart>$numrows)
{
echo "<A HREF=$php_self?rowstart=rowstart-3>";
echo "< Previous Page</A>";
}
echo "|";
$numrows=mysql_num_rows($result2);
if($rowstart+3<$numrows)
{
echo "<A HREF='$php_self?$rowstart=rowstart+3'>Next Page></A>";
}
?>

Grabbing Data From A Table And Displaying It
I'm grabbing data from a table and displaying it but I want to to spand out into multiple pages...I got it all setup but when I click on the next link nothing happens... I got it setup at "3" right now just for testing..I have 5 entries in the database.. anyways could someone help me out? here is the code:

<?php

// Get connection info
include "../connect.php";
// End connection info
if(!$rowstart) $rowstart=0;
// Start database select
$result = mysql_query(
"SELECT * FROM links WHERE notactive='$notactive' order by date desc limit $rowstart,3"); //Select Database
$result2 = mysql_query("select * from links");
if (!$result) {
echo("<P>Error performing query: " .
mysql_error() . "</P>"); exit(); }
// Display the text of each host
while ( $row = mysql_fetch_array($result) ) {
if ($notactive = 1) {
echo ("<table width=500 height=57 border=0 cellpadding=0 cellspacing=0>");
echo ("<tr>");
echo ("<td align=left valign=top><strong>" . $row["name"] . "</strong></td>");
echo ("</tr>");
echo ("<tr>");
echo ("<td align=left valign=top>" . $row["desc"] . "</td>");
echo ("</tr>");
echo ("<tr>");
echo ("<td align=left valign=top><a href=" . $row["url"] . ">". $row["url"] ."</a></td>"); }
echo ("</tr>");
echo ("<br><br>");
echo ("</table>");
}
if ($rowstart>$numrows)
{
echo "<A HREF=$php_self?rowstart=rowstart-3>";
echo "< Previous Page</A>";
}
echo "|";
$numrows=mysql_num_rows($result2);
if($rowstart+3<$numrows)
{
echo "<A HREF='$php_self?$rowstart=rowstart+3'>Next Page></A>";
}
?>

Grabbing Data From A Table And Displaying It
I'm grabbing data from a table and displaying it but I want to to spand out into multiple pages...I got it all setup but when I click on the next link nothing happens... I got it setup at "3" right now just for testing..I have 5 entries in the database.. anyways could someone help me out? here is the code:

<?php

// Get connection info
include "../connect.php";
// End connection info
if(!$rowstart) $rowstart=0;
// Start database select
$result = mysql_query(
"SELECT * FROM links WHERE notactive='$notactive' order by date desc limit $rowstart,3"); //Select Database
$result2 = mysql_query("select * from links");
if (!$result) {
echo("<P>Error performing query: " .
mysql_error() . "</P>"); exit(); }
// Display the text of each host
while ( $row = mysql_fetch_array($result) ) {
if ($notactive = 1) {
echo ("<table width=500 height=57 border=0 cellpadding=0 cellspacing=0>");
echo ("<tr>");
echo ("<td align=left valign=top><strong>" . $row["name"] . "</strong></td>");
echo ("</tr>");
echo ("<tr>");
echo ("<td align=left valign=top>" . $row["desc"] . "</td>");
echo ("</tr>");
echo ("<tr>");
echo ("<td align=left valign=top><a href=" . $row["url"] . ">". $row["url"] ."</a></td>"); }
echo ("</tr>");
echo ("<br><br>");
echo ("</table>");
}
if ($rowstart>$numrows)
{
echo "<A HREF=$php_self?rowstart=rowstart-3>";
echo "< Previous Page</A>";
}
echo "|";
$numrows=mysql_num_rows($result2);
if($rowstart+3<$numrows)
{
echo "<A HREF='$php_self?$rowstart=rowstart+3'>Next Page></A>";
}
?>

Displaying Information In A 1 Row/2 Column Table
I'm very new to php scripting and haven't quite figured out what I need to do here.

I need to display information in a 1 row/2 column table. I have the MySQL query working fine, but the scripting part in php is killing me!

In the first column a graphic about 70x70 will be shown (plus some additional padding). In the second column will be the description information. The second column will be around 400 pixels wide.

How do I set this up in php? It's easy enough in HTML, but I've about killed myself trying to figure out how to properly lay this out in php!

Displaying Array Results In Table
I'd like to display the results of an array in a table format with the Alias, Alias Destination & Username as column headings & the results underneath. PHP Code:

Displaying Records In A Split Table?
trying to split up results of a query into a split table. example: PHP Code:

Displaying Data In Html Table.
I wondered if anyone could offer some guidance, I trying to write a
php script to connect to a database, and display the records in a
table.

I found the code here in a php4 text, and when I run this directly
through the php intrupeter, the line Successfully connected is display
and 4 as the number of rows.

The database table we connect to, has three field username, firstname,
surname.

When I tried a while loop, to display the data in a table. No values
were displayed.

Could anyone possibly demonstrate how to display the username,
firstname, surname values in a basic table?

<?php
function db_connect(){
global $MYSQL_ERRNO, $MYSQL_ERROR;

$link_id = mysql_connect("localhost","user04", "password04");

if(!$link_id){
$MYSQL_ERROR = "Connection failed";
return 0;
}
else if(empty($dbname) && !mysql_select_db("database04")){
$MYSQL_ERROR = mysql_error();
return 0;
}
else return $link_id;
}

!$link_id = db_connect();
if(!$link_id) die(error_message('Error connecting'));

$result = mysql_query("SELECT * FROM users");
if(!$result) error_message('Error in selection');
else echo "Successfully connected. ";

$query_data = mysql_fetch_row($result);
$total_records = $query_data[0];

if(!$total_records) error_message('No records');
else echo "$total_records.";
?>

Displaying Table Field List
I got a function that displays a list of the fields in a certain mysql table.  I got it off of this site.  The problem is that it only displays the word Array and I'm not sure why.  This is the code for the function: Code:

Displaying A Table Using ID Number As Hyperlink
i am able to insert and display data to the end user, but i am trying to let the end user edit a row. I am unsure how this is usually done, but i am have the following code to display by data

 echo "<table border='1'><thead><tr>";
            for($i = 0;$i < mysql_num_fields($sql_result);$i++)
            {
             echo "<th>".mysql_field_name($sql_result,$i).
                  "</th>";
            }
     echo "</tr></thead>
           <tbody>";
     for ($i=0;$i < mysql_num_rows($sql_result);$i++)
     {
        echo "<tr>";
        $row = mysql_fetch_row($sql_result);
        foreach($row as $value)
        {
           echo "<td>".$value."</td>";
        }
        echo "</tr>";
     }
     echo "</tbody></table>";

The user have a jump menu (combo box) to pick the table they need to show information on, so the columns displayed are going to vary, but i have a column called ID which is the same in each tables which is the index (auto increment) field.

I was thinking about using this number comnbined with a hyperlink, so the user can click it to take them to a page to edit that row.... But i have no idea how to do this, or if there is an easier way which i just do not know; or how do most people achieve what i require...

Formated Email Displaying HTML Code
I'm sending formatted emails that normally work fine, using the following header:

MIME-Version: 1.0

Content-type: text/html; charset=iso-8859-1

From: John Cook <jfoc@sev.com.au>


However, one person I send it to (unfortunately, the client I'm actually designing this email for) sees it as HTML code, no formatting. She does use MailMarshal, an email content filter. And the header in the returned email contained these lines:

X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - elaine.networkeleven.net
X-AntiAbuse: Original Domain - hartleyfamilylaw.com.au
X-AntiAbuse: Originator/Caller UID/GID - [99 99] / [0 0]
X-AntiAbuse: Sender Address Domain - elaine.networkeleven.net

My question - would an email filter block HTML formatting? Should I do my header differently?

Displaying Html Code On PHP Generated Page
I am trying to create a link page in my php application. this is a page that will display a block of html code that a visitor can copy and paste into their web site to create a link back to mine. My PHP page has a line in it like this:

define('TEXT_INFORMATION', '<html page code is here>');

I have added the html code to create the page as noted above. the page contains a same of the banner image file and the html code that goes alon with it. My problem is that I haven't been able to "quote" the html code so that ir will not be executed.

every time I try to run the application from my web server my page will display two copies of the banner iimage not on banner image and text block like it should. Any suggestions?

Java Script Code For Displaying Images In PHP?
I have this java script code that updates the "img src" tag of my images on the page...

<script Language="JavaScript">
function showupdate(photo){
document['bigPhoto'].src = photo;}
</script>

Now, is there any way to write this code in PHP (not in Java Script), since I want to save that "photo" variable for later use and manipulation... ???

Displaying Php Code On Website For Learning Purposes
I would lilke to display Php code on my website for learning purposes, without being interpreted by the web server. Just displayed. Highlighter would be better. How can I do it?

Format Source Code For Displaying On A Web Page
Is there a good function or plugin out there to format my source code examples?  I'm writing an article for a web page and want a very simple source code formatter.  Eg: code in black, comments in red, quoted items blue, key words green, class names bolded.

Displaying A URL Stored In A Table As An Image On The Page?
In a table in my database I have a column for storing the URL of an image of a product. What PHP code would I use to display the image? PHP Code:

Combining Data From Two Fields, Displaying With Another Table
What I am trying to do is pull data from two tables and display it on one page. The code below doesn't display any errors, but all it prints is the results from the first query. Ideas? Thanks.

(I also need to somehow put a variable in for the warranty table data so it is tied to the product_status table data. You can see there is a WHERE in the first query of pid, but no WHERE in the second query. That is a seperate question, though. It would make this way too long, so I will post it separately). PHP Code:

Displaying SELECT Results In A Formatted Table
I was wondering how to show a table with a max limit of 20 results per page. I have various data being pulled and its putting it in a table, but its displayed all in one row. I want to format it so its a 4 column/5 row table. With that I then want the page to generate a numbered list at the bottom that calculates how many pages it takes to show 20 items on each. Code:

Displaying SQL Query Results In 3 Column Table
I would like to be able to display the results of an sql query in an html table, but the results need to be displayed in three columns, for example:

Column 1   Column 2   Column 3
Result 1     Result 2     Result 3
Result 4     Result 5     Result 6
Result 7     Result 8     Result 9

I've tried to find the answers on the internet but i can't find anything that suits my needs!

Displaying Multiple Queries To Same Table Excluding Different Rows!
i've got a table with 224 town listings and their ID's in it from 6 counties, and I want it to displayin a 6 columned table, each county getting their own column. Anyway, here's what I've got and what's happening: PHP Code:

Security Code Image In PHPNuke Login Isnt Displaying
i installed the PHP Nuke in a remote web space bought from prackhost.Problem is that iam not able to get the security code to login to the site as admin or normal user. All the remaining images like links and logo are comming except that security code. Iam not able to do any furthur action.

Run PHP Code Grabbed From A MySql Table
I have a quick query (no MySql pun intended!),

I've set up a beta-tester section on my website that requires persons to register and log in to be able to access my beta software. Each of the pages that make up my beta tester section (pages that you can only view when logged in) are stored in a table on a MySQL database behind a firewall (so nobody can access them directly). Some of these pages contain PHP code and I was just wondering if there is any elegant way to include that in the page being sent out so that the PHP code is executed. Sort of like an include() function but instead of a filename of a PHP script as the argument, a string with the code to include in it. At the moment I've implemented a rather ugly an inelegant system whereby the code in question is bunged out to a unique file on the server, that file included and then that file wiped. Horrible, error prone and completely and utterly butt-ugly hack I know!

Checking Whole Table With Strpos Code
I have a problem now to check the whole table with this code... can someone please help me?

$q6=mysql_query('SELECT * FROM banlinktable');
$o6=mysql_fetch_object($q6);
$banurl=$o6->url;

if (strpos($newsubmitrul, $banurl) != FALSE)
{
exit;
}

With this code it will only check the last inserted row, how can I check the whole banlinktable for the url?

Need To Change PHP Code To Include A New Table In MySQL
I need a little help on this PHP results back end script page. I have a database with 3,ooo,ooo files and with 3 tables. I also have a shell script that loges onto a .gov site, downloads the updated database, and overwrites/populates the MySQL tables with the updated data every day via cron.

The query works fine, but I added a new table, and would like to display the data from the new table UNDER the original results.

I will post the php code below, but here are a few things that may help. There are 2 search fields, 1 for callsign, and the other for zip codes. I am only concerned with the callsign query. Also, this code is formated to query all 3 of the original 3 tables and return the most updated data.

The original 3 tables are named am, en, and hd. When a search query for callsign is being done, it gets all the data from the 3 tables, am, en, and hd. Then it displays the results. I would like the results from my newly added table, named hamwave_logs, to be displayed just under the original results. All 3 tables plus my new table have a field named callsign. Here is the code:

Code To Make Table Rows Of A Result Appear In Alternating Colours...
How can I get it so that when I run a search, and the results come back in table format, the rows are alternating colours, like on Devshed's forums? I believe there was some code here some time ago saying how to do it..

CLI ( Command-line ) PHP Displaying Source Code In-line When Programis Executed
I'm using PHP 4.4.2, and use PHP on both the command-line and the web.

I am running PHP on SuSE 10 Linux , in a VMware 5.5 workstation, using
Apache 2.0.55 , on my Dell laptop. Everything has been running flawlessly
without problems. Very amazing to use VMware, it has worked beautifully.

uname -a

Linux xxxxxxx 2.6.13-15.8-default #1 Tue Feb 7 11:07:24 UTC 2006 i686 i686 i386
GNU/Linux

php -v
PHP 4.4.2 (cli) (built: Feb 7 2006 20:13:29)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

php -m

[PHP Modules]
bcmath
bz2
calendar
ctype
curl
dbx
dio
domxml
exif
ftp
gd
gettext
gmp
iconv
mcrypt
mssql
mysql
ncurses
openssl
overload
pcre
posix
session
shmop
sockets
standard
sysvsem
sysvshm
tokenizer
wddx
xml
yp
zlib

When I run the following program from the command line it prints out the
source code as well as the output from the program. I run other PHP programs
on the command-line and this doesn't happen. It's really peculiar. The
error output is below.

I copied this off of php.net, and have modified it only slightly to allow
command-line input. I was trying to find a CSV solution, which I ended up
finding elsewhere, but am curious why this program would error out the
way it does--have I misconfigured something? My php.ini is basically
unchanged, if at all. I think I might have set the path to mysql but that's
about it. When I run this program from the web it works without error.

<?php

if ( $argv[0] )
{
$file = $argv[0] ;
}
else{
$file = $_GET['file'] ;
print "<font face=arial>
" ;
}

$row = 1;

$handle = fopen("$file", "r");

while ( ( $data = fgetcsv($handle, 1000, ",") ) !== FALSE )
{

$num = count($data);

print "$num fields in line $row:<br>
";

$row++;

for ($c = 0; $c < $num; $c++)
{
print "$data[$c]<br>
" ;

Help With Displaying Selecting A Date Range And Displaying Results
I wish to create a simple form that allows the selection of a start date and a stop date with the ability to select what columns to be displayed in the result page.

Command-line Php Displays Code Instead Of Executing Code
I am using CLI PHP to run a PHP script, c:wampphpphp.exe, but
instead of executing my script, it's actually displaying the raw code
instead.

How can I run my code using CLI PHP? I installed WAMP5 on WinXP.

Grab Content From HTML Table And Place Into MySQL Table?
I am in the process of helping a co-worker upgrade some of his old static html pages into dynamic MySQL driven pages. He currently has a lot of pages with huge tables displaying data. Does anyone know if there is a script or class that can convert a table to a .sql file for upload?

Table Background Color Based On Results From MySQL Table
I am trying to get the "Did User Agree" field on a database query to be colored Green for "Agreed" Red for "Disagreed" and Blue for "Agreed (2nd Time)" .. I have my PHP setup to do the query just fine as of right now with alternating column colors, just can't seem to get the colors to work as I am hoping for.  Can anyone help me get the Agreed? table's background color to the colors above? Code:

Outputting A Table Or Form Using SHOW FIELDS FROM Table
In the code the MySQL database was queried using "SHOW FIELDS FROM table" which and the returned results of column names was then use to build an output for a form and a table with php using a series of if statements along the lines of if the returned field name matches something echo a text input field.

I have never seen this done this way before, so I want to get the opinion of the devshed user. Does it seem like an unsual long process to build up a form. Is there a security advantage doing it this way? Has anyone ever done it this way before?

Finding Matches In A Table And Then Moving That Match To Another Table?
Ok, I have a database that has a table called critiera in this table
is to fields on is ID and the other is critiera.

Now I want to filter out all the one that don't apple to the list and
move the one that match to a different database.

I know how to open a connection, close, select

but I don't know how I would inside of a database use another one as
the way to create the list of critieras....

Mysql Fetch_field Gets Table Alias, Not Real Table Name
After a SQL 'select .... from tablename alias'
the mysql_fetch_field function returns a value $result=>table which
will contain the alias, not the actual table name.
Is there a way to get the actual table name ?

I am running mysql 4.1 and php 4.4

Grab Data From A Table, Echo, Then Insert It Into A New Table...
I'm trying to do is count the number of times usernames shows up in a table. I then want to reinsert that information into a different table with the Username in column1 & the occurrences in column2 for every user that is echoed on the page. Code:

Using PHP To Sort Data In MySQL Table 1 By Values In Table 2
I have a MySQL database with 2 tables in it. products and prices.. Products has a field in it called 'prodno'. Prices has a field in it called 'prodid'.

There is one of each item in products and each product has it's own unique 'prodno'

There are multiple instances of each product's pricing in prices.. One for each price.. So if a product had multiple prices depending on quantity it would have an entry for each price.. Example:

id = 1
prodid = 7001
qty = 300
price = 12.5

id = 2
prodid = 7001
qty = 400
price = 15.5

I was wondering if I could query the database getting info from the products table but sort it according to the prices in the prices table.

Kinda like doing a "SELECT * FROM products" ordering it by the lowest price value from each item..

This is all very confusing to me, and I'm the one writing it. Let's try one last time..

Query the database selecting * from products (I plan on using all the info in products) and ordering them by the lowest price for each item in the prices table. I've tried sorting the results of just a basic SELECT * FROM products using Javascript and PHP but with pagination in the results it makes it a bit hard.

Old Code Vs New Code - Language Syntax Change?
I've recently begun programming PHP again and have found my old code doesn't work anymore. It's been a few years since my code was written, and simple functions don't seem to be working. I've done a bit of research into the syntax again and found the following;

I used to use a function as such;

if ($REQUEST_METHOD=="POST") {
Now I've seen alot of the syntax is
if ($_SERVER($REQUEST_METHOD=="POST")) {
And referencing variables from the form is as such;
$_POST['variable']

Where previously I could reference them in the simple form; $variable

Has there been a language syntax change that would cause my old code to be obsolete? Is there a configuration line that could be changed to allow this old code to work?

Update Table While Insert Data To Another Table
it seem like mine coding din work.
[php]<?

include("checkin.html");
$conn=mysql_connect('localhost','root','') or die ('Could not connect to server');
$today = date("Y.m.d");
mysql_select_db('hms', $conn);

$ok = mysql_query("INSERT INTO check_in(ID,room_no,datein)values ('$ID','$room','$today')", $conn);

if( $ok ){

$up = mysql_query("UPDATE studtable SET checked = 'checkin' where [ID] = '%ID');

if(mysql_affected_rows( $up ) == 1)
{
echo'Checked IN!'
}else { echo'No such student to check in' }}
else { echo'Check In FAILED, please check again'}?>[php]

BB Code - Escape A Bracket In BB Code?
Is there a way to escape a "bracket" in BB code? The beginning of a bbcode
post I made starts with something in brackets [like this]. This causes a
strange thing to happen to the remainder of my post. Removing the brackets
makes my post normal. That shows me that I need to escape the brackets.
However, a simple backslash does not seem to do the trick i.e. this [wont
work]

I am not the administrator of the bb forum, just a poster. So I need to know
what to do on my end (as opposed to an adiministrator's power to
reconfigure, etc.

Translate Perl Code To PHP Code.
Can some one transfer this Perl into PHP? It is from the Spreadsheet-WriteExcel. PHP Code:

How To Transfer A Data With An Id To Another Table From A Table?
how am i going to transfer let say a name identified using the suer id and copy the name to the other table having the same user id>?

How Can I Find A Name From One Table In A Text From Another Table?
I have one table with a description field and other info, and I also have another table with a list of names and picture url:s. When I display the text description on my site I'd like to know if there are a match with a name from the 'names' table in the text. Code:

Returning Table Name As Well As Fields From That Table
I am returning all fields from news and from regional, however I want to determine where the fields have come from when I ouput the data, therefore I need to return the table name with the fields. Is this possible? Code:

Moving Data From One Table To Another Table
Does anyone know how to move one row from a table in a mysql database to another table using php?


Copyright © 2005-08 www.BigResource.com, All rights reserved