hielo 65 Veteran Poster

On line 20 you are using a single "|" to mean "or". You need TWO since you are not doing bitwise OR-ing. Furthermore, that line should be: if(!isset($_POST['email']) || empty($_POST['email']) || !isset($_POST['pass']) || empty($_POST['pass']) ) Also, change mysql_fetch_array() to mysql_fetch_assoc() Lastly, IMMEDIATELY after the header("Location: account.php"); put exit();

hielo 65 Veteran Poster

Apologies Airshow. Your post was not yet there when I opened the page.

Regards,
Hielo

hielo 65 Veteran Poster

You are currently have the following (on line 164):

<input type='hidden' name='unit_price_". $row['pid'] ."' />

The js function needs to compute: unit_price_X * qty_X (where X is whatever value is in $row['pid'] )
but you have NOT assigned a value! Since it is a hidden field, the user cannot enter anything either. You MUST assign it a value.

try:

<?php
session_start();
require_once ('../mysql_connect.php'); // Connect to the db.

$cid = mysql_real_escape_string($_POST['cid']);
$surname = mysql_real_escape_string($_POST['surname']);
$order = mysql_real_escape_string($_POST['order']);


/* Retrieve the cid and surname for that combination. */
$query = "SELECT * FROM customer WHERE cid='$cid' AND surname='$surname'";	

// Run the query.
$result = @mysql_query ($query); 

// Return a record, if applicable.
$row = mysql_fetch_array ($result, MYSQL_NUM); 



/* ============ ALL OK WITH LOGON ================ */
// A record was pulled from the database.
if ($row)
{ 

	// Set the session data & redirect.
	session_name ('YourVisitID');
	session_start();
	$_SESSION['cid'] = $row[0];
	$_SESSION['surname'] = $row[3];
	$_SESSION['agent'] = md5($_SERVER['HTTP_USER_AGENT']);

	/* ============= LOG DETAILS ============= */
	$title = $row[2];
	$surname = $row[3];
	$add1 = $row[4];
	$add2 = $row[5];
	$add3 = $row[6];
	$add4 = $row[7];
	$pc = $row[8];
	$round = $row[19];
	$email = $row[9];

	/* =============== CREATE JS =============== */
	$query  = "SELECT * FROM product";
	$result = mysql_query($query);

	$jsvar = "var ";
	$jsunit = "";
	$jsqty = "";
	$jstot = "";
	$jscalc = "document.box.tot.value = ";

	while($row = mysql_fetch_array($result, MYSQL_ASSOC))
	{
	   if ($row['sts'] ==1){

		$jsvar .= " unit_price_". $row['pid'] .", " . "qty_" . $row['pid'] . ",";
		$jsunit .= "unit_price_". $row['pid'] ."=document.box.unit_price_". …
hielo 65 Veteran Poster

In your edit page, $_GET=$_GET['model']; really makes no sense AND You are NOT using the model value (from the previous Edit link) to filter out the results. I was expecting to see: $query=sprintf("SELECT * FROM mobilephones WHERE model='%s'", mysql_real_escape_string($_GET['model'])); which should give you the details of the specified/selected item. Furthermore, after executing that statement I was NOT expecting to see a while construct after that because if the model if in fact your primary key, it should be unique and you would get at most ONE record.

hielo 65 Veteran Poster

Instead of: $(this).closest('form').submit() try: $('#login_form').submit() AND make sure that there is NO html element with name="submit" (nor id="submit" )

hielo 65 Veteran Poster

You are currently executing 10 queries (one in every iteration). Instead, do NOT use a for construct and instead execute ONE query. IF you want ALL the records, do NOT use a WHERE clause - simply execute: Select cat_id, cat_name from tovanu.categories If you want only the records with categories 1 through 10 then use: Select cat_id, cat_name from tovanu.categories WHERE (cat_id>=1 AND cat_id<=10) then to process the results:

while($row = $db->fetchRow(MDB2_FETCHMODE_ASSOC)){
  echo '<li><a href="viewer.php?id=' . $row['cat_id'] . '">'.$row['cat_name'].'</a></li>';
}

These might help you as well:
http://www.installationwiki.org/MDB2#A_Quick_Example
http://w3story.tistory.com/entry/How-to-use-PHP-and-PEAR-MDB2-Tutorial

hielo 65 Veteran Poster

You need to be more specific about what you are looking for. Assuming that the following dates are free (status==1):
2010-11-02 through 2010-11-10
2010-11-16 through 2010-11-20

and the person plans to stay for 4 days, are you looking for a two element array that states:
2-10
16-20

or ALL the possible ranges:
2-5
3-6
4-7
5-8
6-9
7-10
16-19
17-20
etc

hielo 65 Veteran Poster

try:

$str=<<<STR
multipart/alternative; boundary="001636284f500b21f90494114b4d"
multipart/alternative; boundary='f01636284f500b;21f90494114b4f'
multipart/alternative; boundary="001636284f;500b21f90494114b4d"
foo; fa="001636284f5"\; fy="00b21f90494114b4d"
STR;
$str=preg_replace('#(\x22|\x27)([^;]*)(?<!\x5C)(;)(.*?)\1#','$1$2'.chr(7).chr(92).';$4$1',$str);
$m=preg_split('#(?<![\x5C]);#',$str);
foreach($m as $i=>$v)
{
	$m[$i]=str_replace(chr(7).chr(92).';',';',$v);
}
//this shows the result
print_r($m);
hielo 65 Veteran Poster

change line 17 on your first post to:

printf("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td><a href=\"edit_phone.php?model=%s\">Edit</a></td></tr>\n", $myrow["make"], $myrow["model"], $myrow["camera"], $myrow["bluetooth"], $myrow["internet"], $myrow["smartphone"],$myrow['model']);

then create a page named "edit.php" where you can retrieve the specified record and provide edit fields for the specified record. You would be able to retrieve the selected record using $_GET['model']

hielo 65 Veteran Poster

you may want to use preg_replace_callback() for this. For the sake of clarity, let's say you have the following TWO (separate/independent) input strings

a;b\";\"c;d';'ef\;g

a;b\";'\"c;d';'ef\;g

what results do you expect? Do you have a sample of an actual/realistic input string?

hielo 65 Veteran Poster

make sure that is no element with name="location" either. As an example, the following would not work as you expect in IE:

<script type="text/javascript">
window.onload=function(){
	document.getElementById('location').innerHTML='hi'
};
</script>
<input name="location" />
<div id='location'></div>

the getElementById() incorrectly returns a reference to the INPUT instead of the div.

hielo 65 Veteran Poster

On your first block of code above, this is wrong: <tr id="data">...</tr> If your query yields three records you will see the same id three times:

<tr id="data">...
<tr id="data">...
<tr id="data">...</tr>

You are NOT allowed to have an id multiple times. It MUST be unique throughout the page. My suggestion would be to append the record id prefixed with an underscore - ex:

<tr id="data_1">...
<tr id="data_12">...
<tr id="data_34">...</tr>

On your second block of code above, on lines 9-16, you do NOT need any php code. On your first code of block you are generating an HTML table. Each Row of that table corresponds to one record in your db. So if you click on Edit of the Third row, you do NOT need to send a request to the server to find out what the data for that record is. You already have it on the browser (in your HTML table!). All you need to do is Extract the data from each of the cells in the relevant row. If you incorporate the edits I suggested above, you can extract the id from the <TR> element.

Thus, there really is no need for the id in <a href="?id=X">Edit</a> .

As for your popup.txt file, it currently has: $("#popup").click(function(){...}); Instead, use:

$(".popup").bind('click',function(){
		//find the parent row of the clicked "Edit"
		var row= $(this).closest("tr");

		//"extract" the id from row
		var id =row.attr('id').split('_')[1];

		//find the hidden field in your edit form and assign the id
		$('#ud_id').val(id);

		//iterate through each …
hielo 65 Veteran Poster

and parameters file
Car
MODEL~PRICE

You cannot have Car on the first line and expect to have a result because if you look closer at Cars.txt NO record has "Car" listed under ANY of the columns. You need to be more explicit. So instead of "Car" use "Truck" since "Truck" DOES appear in the TYPE column.

Additionally, you also need to specify in WHICH column to look for "Truck". So use this as your parameters.txt file:

Type:truck
MODEL~PRICE

and use the following code instead:

<!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>Untitled Document</title>  
</head> 
  
<body> 

<?php  


// check to see if file uploaded, using the super-global array $_FILES  
if (isset($_FILES['UploadedFile']['tmp_name']))  
{
	# $_FILES['fieldname']['name'] gives the uploaded file name
	print ("<p>");  
	$filename = dirname(__FILE__).'/'.$_FILES['UploadedFile']['name']; 
	move_uploaded_file($_FILES['UploadedFile']['tmp_name'], $filename);
	$OUTFILE = fopen($filename, 'r') or die("Can't open $filename for read");

	//read the entire file into an array
	$params=file('parameters.txt');

	//after this $type will have "SPORT"
	$search=explode(':',strtoupper($params[0]));
	$searchColumn=trim($search[0]);
	$searchValue=trim($search[1]);

	//after this $columns[0] will have "MODEL" && $columns[1] will have "PRICE"
	$columns=explode("~",strtoupper(trim($params[1])));

	//read the first line of the csv
	$data = fgetcsv($OUTFILE,1000, "~");

	//now find which column corresponds to "TYPE"
	$typeIndex=array_search($searchColumn, $data);

	//now find out the column index for each of the columns specified in parameters.txt
	foreach($columns as $i=>$v)
	{
		if(FALSE===($columns[$i]=array_search($v, $data)) )
		{
			echo ("Column $v does not seem to exist");
			unset($columns[$i]);
		}
	}

	echo('<table>'); 
	do{
		

		//make sure that the type value of the current $data row matches what
		//was provided …
hielo 65 Veteran Poster

the problem with what you have now is that if you were to change: var tj = new automobile("Jeep", "Wrangler", 2004, "4.0", "4X4"); to: var tj = new automobile("Jeep", "Cherokee", 2010, "4.0", "4X4") ;

then the output would NOT reflect the changes. It will always show Wrangler as model and 2004 as year. This is because in your constructor you hard coded those values. Instead, what you need to do is change lines 12-16 so that the value assigned to the object properties are NOT the hard coded values, but INSTEAD use all the parameters in automobile - ex: this.make = make;

hielo 65 Veteran Poster

. It messed up my formatting

I forgot the closing table tag.

Do you think you can help with my other post I posted just before this one?

I really don't feel like deciphering someone else's code. I don't know what is in the js file but it should be difficult to achieve what you want if you make ajax requests.

hielo 65 Veteran Poster

assuming you have:

<form id="theForm"...>

on your SECOND block of code you posted, in line 6 - instead of: data: ...monstrosity of statements your currently have here... simply use: data: $('#theForm').serialize() The serialize() method should be able to determine accurately which of your radio buttons is actually checked. The problem you are having is that you are NOT limiting your selection to the checked item:

$("input[name='rbGender']:checked").val()
hielo 65 Veteran Poster

Problem now would be that without the ID field queried I can't call a single-record for edit by ID, right?

correct. If all you want is the field->name (as opposed to other field metadata), then the easiest approach would be to get a row of data and get name from that row. This is probably what you are after:

<?php
//This section gathers the field names
// and puts them in the first row of the table
$sql = "SELECT `ID`, `Code`, `Account Info`, `Ph#`, `User`, `PW`, `Web`, `Active` FROM `vendors` ORDER BY `Company/Name` ASC";
$query = mysql_query($sql) or die(mysql_error());

/*
lookup these functions in the PHP manual if you are not familiar with them:
	mysql_num_rows()
	mysql_fetch_assoc()
	implode()
	array_keys()
	array_slice()
*/
if( mysql_num_rows($query) > 0)
{
	$row=mysql_fetch_assoc($query);
	
	echo '<table>';
	echo '<tr><th>'.array_keys( array_slice($row,1) ).'</th></tr>';
	do{
		//save the value of id
		$id=$row['ID'];
		
		//"erase" ID from $row
		unset($row['ID']);
		
		//implode will "join" all the $row elements using '</td><td>' as the 'glue'
		echo '<tr><td>'.implode('</td><td>',$row).'</td><td><a href="?id='.$id.'">[Edit]</a></td></tr>';
	}while($row=mysql_fetch_assoc($query));
} 
else
{
	echo 'No Records found';
}
?>
Xtremefaith commented: Great help, patient enough to help me figure out a complicated issue +1
hielo 65 Veteran Poster

What if ID wasn't the first field in the table?

The order in which the field is defined in the TABLE does NOT matter. What matters is the order in which you list them when execute your query.

If you execute: SELECT `Code`, `Account Info`,`ID`... then ID will be the THIRD column in the result set (index=2), not the first column (index=0).

Why can't I say i=1 now (skipping 0)? I thought by calling the way I was it was doing in short what you did by calling all of them.

You can do that BUT that relies on the ID ALWAYS being defined first in your table. There's no way for me to know for a fact that ID is the first field in your table when all you have shown is SELECT * . However, if you had shown that you were executing SELECT ID,.... then I would have suggested $i=1

hielo 65 Veteran Poster

It looks like you are creating a RADIO AND a TEXT field with the SAME name every time. Give them different names. For example, try using this for line 15:

document.getElementById('segment_form').innerHTML += "<input type='text' name='txt_segment_type_"+j+"' size='10' onFocus='check_other()' />";
hielo 65 Veteran Poster

the easiest approach would be NOT to use SELECT * ... . Instead, mention explicitly which fields you want AND make sure the ones you want to hide appear first: SELECT ID, Code, Account Info, Ph#, User, PW, Web, Active That way if you wanted to "hide" bod ID and Code, then instead of for($i=0;...) you would use for($i=[B]2[/B];...) NOTE: if you do not want/need ID at all, then don't SELECT it. Simply list the columns/fields that you DO need/want.

hielo 65 Veteran Poster

it should be while ([B]$row[/B] = mysql_fetch_assoc($gar))

balle commented: Thanks it worked like a charm! =) +1
hielo 65 Veteran Poster

In your constructor, make, model and drive are all wrong. You MUST put apostrophes (or double quotes) around the values because those values are STRING values - ex:
WRONG: this.drive = 4X4; CORRECT: this.drive = '4X4'; So fix the above three statements first.

As for lines 19-23, you CANNOT use this.XXX (where XXX is any of the automobile properties) because those document.write statements are NOT being executed within a method of automobile nor within the constructor. On line 18 put the following:

var c = new automobile('Ford','Mustang',2010,4.0,'FWD');

then in lines 19-23 change [B]this.XXX[/B] to [B]c.XXX[/B]

hielo 65 Veteran Poster

line 11 should be "less than day.length" NOT "less than or equal to": for (i=0; i [B]<[/B] day.length; i++)

hielo 65 Veteran Poster

you would need a primary key in your table `mobilephones`. Do you have a primary key? If yes, what is it?

Also, for effiency purposes, try to avoid SELECT * if you are NOT going to use all the fields/columns in your table. Instead list only the fields/columns you need.

hielo 65 Veteran Poster

FYI: If you REALLY needed BOTH ids, then you could alias one OR both of the ids: SELECT c.fname, c.lname, u.id as User_id, c.id as Contacts_id...

hielo 65 Veteran Poster

OK, now I see the problem. The issue is that you are executing SELECT * but both tables have an id column. What you need to do is specify precisely which columns you want by prefixing the columns with the table (notice that I used "u" as the alias for the "users" table and "c" for the contacts table):

Assuming you are interested in users.id, try:

$sql='
SELECT c.fname, c.lname, u.id
FROM contacts c INNER JOIN users u ON u.id=c.user_id
 WHERE 
        u.username = "' . mysql_real_escape_string($_SESSION['username']) . '"';
hielo 65 Veteran Poster

and its being displayed from the user_id of the table rather than getting the result from the id of the table.

I don't understand what you mean. Post a sample of BOTH tables

hielo 65 Veteran Poster

what is NOT working on the code you posted? Are you NOT getting any results? Are you getting the ENTIRE table? Are you getting the WRONG id?

Have you tried to echo your sql statement to verify what sql command is actually being executed?

hielo 65 Veteran Poster

change your SELECT to:

<select id="cpule" onchange="updatecost1();">
	<option value="Core 2 Duo 2.7">Intel Core 2 Duo 2.7Ghz</option>
	<option value="Core 2 Qaud 2.6">Intel Core 2 Quad 2.6GHz</option>
</select>
hielo 65 Veteran Poster

does this consider as correct output?

Yes, of course! It clearly shows you that $result IS an array with all the information you want. For example: echo $result[0]['label'] . ': '. $result[0]['value']; will give you the Last Trade information. If you want to see all the information, use a foreach:

foreach($result as $item)
{
  echo $item['label'] . ': '. $item['value'];
}
hielo 65 Veteran Poster

You are welcome!

Regards,
Hielo

PS: Don't forget to mark the thread as solved.

hielo 65 Veteran Poster

It should be:
http://finance.yahoo.com/q/ta?s=4707.KL+Basic+Tech.+Analysis&t=3m

Are you sure it is including the file? Change:

include("simple_html_dom.php");

to:

require_once("simple_html_dom.php");

If it throws an error then you may have the wrong path to the file.

hielo 65 Veteran Poster

download simple_html_dom.php:
http://simplehtmldom.sourceforge.net/

then try:

<?php
include("simple_html_dom.php");
$html=file_get_html("http://http://finance.yahoo.com/q/ta?s=4707.KL+Basic+Tech.+Analysis&t=3m");
$rows=$html->find('div[id=yfi_quote_summary_data] table tr');
$result=array();
foreach($rows as $row){
	preg_match('#([^:]+):(.+)#',strip_tags($row),$m);
	$result[]=array("label"=>$m[1],"value"=>$m[2]);
}
print_r($result);
?>
hielo 65 Veteran Poster

are you sure that the FIRST line in cars.txt has:
MAKE~MODEL~TYPE~PRICE

(all in upper case)?

Also, try changing: $columns=explode('~',strtoupper($params[1])); to: $columns=explode('~',strtoupper(trim($params[1])));

hielo 65 Veteran Poster

The problem is that when you provide an email, then the following IS executed:

else if ($_POST[email])
{
	$email = $_POST[email]; 
	if(!ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email))
	{ 
		$err = 'Email invalid because wrong number of characters!<br />';
	}
}

In other words, it goes INTO the email else if clause and thus skips all the remaining else if clauses. Try using this instead:

else if( !ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $_POST['email']) )
{
	$err = 'Email invalid because wrong number of characters!<br />';
}
hielo 65 Veteran Poster

at the end of the getBook method try adding return this;

hielo 65 Veteran Poster

after line 28 put print_r($params); do you see the data you had in parameters.txt? If not, the most likely the path to your file is wrong.

hielo 65 Veteran Poster

Do you get any errors? Have you tried putting echo statements WITHIN the if clauses to see if any of the if clauses are getting executed or not?

hielo 65 Veteran Poster

in line 40 of the code i am getting the error Parse error: syntax error, unexpected T_VARIABLE. Any help would be great.

At the end of line 37 I missed a semi-colon. Make sure you add it.

hielo 65 Veteran Poster

if you change it FROM:
Sport
model~price

to:
SUV
make~price

it should STILL work!

hielo 65 Veteran Poster

is that ALL the code? I don't see you connecting to the DB nor defining the GetSQLValueString() function anywhere. I suspect you are doing this on a separate file, and if so you must include it as well.

hielo 65 Veteran Poster

Assuming that parameters.txt has the following two lines of Input:
Sport
model~price

Try:

<!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>Untitled Document</title>  
</head> 
  
<body> 

<?php  

//then use the above within the 
$temp_name = $_FILES['UploadedFile']['tmp_name'];  
// check to see if file uploaded, using the super-global array $_FILES  
if (isset($_FILES['UploadedFile']['tmp_name']))  
{


	# $_FILES['fieldname']['name'] gives the uploaded file name
	print ("<p>");  
	$fil_name = $_FILES['UploadedFile']['name'];  
	$namefile = $fil_name;   
	$OUTFILE = fopen($namefile, 'r') or die("Can't open $namefile for read");


	//read the entire file into an array
	$params=file('parameters.txt');

	//after this $type will have "SPORT"
	$type=strtoupper($params[0]);

	//after this $columns[0] will have "MODEL" && $columns[1] will have "PRICE"
	$columns=explode('~',strtoupper($params[1]));

	//read the first line of the csv
	$data = fgetcsv($OUTFILE,1000, "~")
	
	//now find which column corresponds to "TYPE"
	$typeIndex=array_search($type, $data);

	//now find out the column index for each of the columns specified in parameters.txt
	foreach($columns as $i=>$v)
	{
		if(FALSE==($columns[$i]=array_search($v, $data)) )
		{
			echo "Column $v does not seem to exist";
			unset($columns[$i]);
		}
	}

	echo('<table>'); 
	do{
		echo('<tr>');

		//make sure that the type value of the current $data row matches what
		//was provided in $type (in parameters.txt)
		if( $data[$typeIndex] == $type )
		{	
			//now iterate only over the set of requested columns
			foreach($columns as $dataIndex){
				echo("\t<td>{$data[$dataIndex]}</td>\r\n"); 
			}
		}
		echo('</tr>'); 
	}while (($data = fgetcsv($OUTFILE,1000, "~")) !== FALSE);  
	echo('</table>');           
	fclose($OUTFILE); 
}
?>   

   <form enctype="multipart/form-data"  
         action="<? $PHP_SELF ?>" method="post">  
   <input type="hidden" name="MAX_FILE_SIZE" value=" " />  
   <input name="UploadedFile" type="file" />  
   <input type="submit" value="UPLOAD" />  

         <h2> Soucre Code File</h2>       
        <p> …
hielo 65 Veteran Poster

What is i have another text file that choses what row of the text file and i do not know how many columns there are when setting this up

I don't know what you mean.

hielo 65 Veteran Poster

I tried with a textarea and it worked fine for me:

<script type="text/javascript">
function setValue(field)
{
	if(''!=field.defaultValue)
	{
		if(field.value==field.defaultValue)
		{
			field.value='';
		}
		else if(''==field.value)
		{
			field.value=field.defaultValue;
		}
	}
}
</script>
<input type="text" value="Enter Title" onfocus="setValue(this)" onblur="setValue(this)"/>
<textarea  onfocus="setValue(this)" onblur="setValue(this)">hi</textarea>

Not sure if you have some other event handler attached to your textarea.

hielo 65 Veteran Poster

In all three if statements you have the same error - on equal sign instead of two. EX: ...&& ($site_type [B]=[/B] "...") it should be: ...&& ($site_type [B]==[/B] "...")

hielo 65 Veteran Poster

try:

$sql="select * from users where twitter_id IN (" . implode(',',$friends) . ") AND status=1";
$result=mysql_query($sql) or die( mysql_error() );

$total=mysql_num_rows( $result );
hielo 65 Veteran Poster

If what I said earlier is true, then you need to investigate why $_GET is missing/not set. I can't figure out why that would be based on the fragments you posted.

hielo 65 Veteran Poster

and also i am trying to read any length of tilde document.

I don't know what you mean by that but since you are using fgetcsv() then each line of the file should have columns separated by '~'. If that is the case, try:

<!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>Untitled Document</title> 
</head> 

<?php 
	$namefile = 'pilots.txt';  
	$OUTFILE = fopen($namefile, 'r') or die("Can't open $namefile for read");
	if($OUTFILE!==FALSE)
	{
		echo PHP_EOL.'<table><tbody>';
		while( ($row=fgetcsv($OUTFILE,1024,'~'))!==FALSE )
		{
			echo PHP_EOL.'<tr><td>'.implode('</td><td>',$row).'</td></tr>';
		}
		echo PHP_EOL.'<tbody></table>';
		fclose ($OUTFILE);
     }
?>  
     <h2> Soucre Code File</h2>      
    <p> 
<?php       
                    show_source(__FILE__);  
    ?>  
                </p>  
</body> 
</html>
hielo 65 Veteran Poster

It sounds like it doesn't even make it into the if clause of your second block. Meaning there is no such thing as $_GET. If that is the case then $item_id has nothing in it either.

hielo 65 Veteran Poster

You can change the CSS of image opacity and border style, but you cannot change the image's background color using CSS

You can if you have the right type of image. What you need is to use images with TRASPARENT backgrounds.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>hielo</title>
		<style type="text/css">
		<!--
			img.editor{background-color:white;border:1px solid white;}
			img.editor:hover{background-color:yellow;border:1px solid blue;}
		-->
		</style>
	</head>
	<body>
		<img id="code" class="editor" src="http://www.daniweb.com/rxrvbimages/editor/bold.gif" alt="Bold">
		<img id="code" class="editor" src="http://www.daniweb.com/rxrvbimages/editor/createlink.gif" alt="">
	</body>
</html>