almostbob 866 Retired: passive income ROCKS

this type="text/css">@import url('menu/menu_style.css"');</style means load the css file inside the menu subfolder of the current folder
doesnt work when you are in a subfolder because the menu folder is no longer a subfolder

<style type="text/css">@import url('/menu/menu_style.css"');</style> 
<style type="text/css">@import url('http://www.yoursite.com/menu/menu_style.css');</style>
<style type="text/css">@import url("<?php echo $_server['document_root']; ?>/menu/menu_style.css");</style>
<link rel="stylesheet" type="text/css" href="http://www.yoursite.com/menu/menu_style.css">
<link rel="stylesheet" type="text/css" href="<?php echo $_server['document_root']; ?>/menu/menu_style.css">
<link rel="stylesheet" type="text/css" href="/menu/menu_style.css">

all work
take your pick

almostbob 866 Retired: passive income ROCKS

That must be the reason why everyone uses some kind of form mailer, to be able to easily html it

almostbob 866 Retired: passive income ROCKS

na its just an <a href='mailto ..... link, most people use a php mailer, even from one user to another, so they can keep a record of what is sent
great way to gather addresses for later mailouts

the standard for mailto allows the link to fill in certain defaults in the mail, add some text to the body
to include the tags in the link use the relevant html entity
< as &lt;
> as %gt;
there is bound to be a table of html entities somewhere easy to google and authored by &lt;i&gt;&quot;".$author."&quot;&lt;/i&gt;";}

diafol commented: gotcha AB. Couldn't work out what the hell he was getting at +13
almostbob 866 Retired: passive income ROCKS

insert into table1 dataset1
insert into dable2 dataset2

reiterating what has been said before (shout) IT IS NOT POSSIBLE (/shout) to update a record that does not exist, update is not a synonym of insert

almostbob 866 Retired: passive income ROCKS

yes,

edit, gday ardav, & 'scuse me hadnt seen the prior answer

almostbob 866 Retired: passive income ROCKS

the error is not in the code suplied
php runs on the server, this code must be ok as it works

show the code of the upload form page, likely one of IE's document quirks has been triggered by that form

almostbob 866 Retired: passive income ROCKS

it may be something as simple as

if($shopconfig['currency']=="€"||$shopconfig['currency']=="other currency with a preference for after") {
return  number_format($amount) . $shopConfig['currency']; } 
else { 
return $shopConfig['currency'] . number_format($amount);}
almostbob 866 Retired: passive income ROCKS

"my shopping cart" == WHAT shopping cart ?

almostbob 866 Retired: passive income ROCKS

its not on your site

your way, does not work
the right way, works

no further discussion required

ya messed up
fix it

[flush]

Xcelled194 commented: Not helpful at all. -1
almostbob 866 Retired: passive income ROCKS

the op
php 4.3.9
the manual php 5.3.9

A URL can be used as a filename with this function if the fopen wrappers have been enabled.

did you read a different documentation than I did
there is no fopen() in your code, therefore URLs cannot be used
a file is still http://www.example/com/FILENAME.FILE_EXTENSION


ya messed up
fix it

almostbob 866 Retired: passive income ROCKS

you are reading a file
the documentation requests a file
the function file_get_contents() should suggest a file
the op states

I need to retrieve a HTML file from an external site (http://example.com/page.html) and parse it.

http://www.example.com is not a file, and not even the uri from the original post
a file is http://www.example.com/FILENAME.FILE_EXTENSION

almostbob 866 Retired: passive income ROCKS

you pointed to a file that does not exist, check the filename

almostbob 866 Retired: passive income ROCKS

http://php.net/manual/en/function.file-get-contents.php echo file_get_contents(urlencode('url')); thats the generic, if there are no special characters in the url echo file_get_contents('url');

almostbob 866 Retired: passive income ROCKS

yep,

iamthwee commented: Props +15
almostbob 866 Retired: passive income ROCKS
h1 { text-align:left;font-family:Arial,"Times New Roman";font-size:0.8em;font-style:normal;font-weight:bold;
margin-top:0;margin-left:auto;margin-right:auto;margin-bottom:0; } // the new bit
h1:first-letter {font-size:200%;font-style:bold;float:left;}//playtime

centrs the h1 on the page left/right(if smaller than full width) no margins top bottom so the next div butts close, and creates a drop cap because I like drop caps
removing margins from one element may leave a margin, if the next element has a margin, <div><p> etc

almostbob 866 Retired: passive income ROCKS

margin:0; and or padding:0; nothing in your css overrides default spacing,

the manual, the online docs, at w3.org are very good, dont have the full link rattling round the empty space on my neck

almostbob 866 Retired: passive income ROCKS

you could fix your database design by a tableupdate now, and
store only a timestamp,
use 4bytes per record instead of 35,
require simpler code to select records,
simpler code to update the table,
simpler code to display
allow any user to have the date and time formatted to their preference, or their country code standard

correct the problem, intead of patch it, and make the whole thing much easier elseif() is fractionally faster than else if()

pbcomput commented: your answer is not related to the question. -1
almostbob 866 Retired: passive income ROCKS

+ could check the innertext or innerhtml of the twitter signin for twitter.com's valid login text to close the divs on receipt of login confirmation
+ should include a button in the twitter div labelled close that fires the CancelSiginin() script, or label the background div, unless there is a visible control some users may refresh the page instead of looking for a close device, and lose whatever they have previously input
& checkout the twitter helpscreens, they probably have this issue pretty well covered

almostbob 866 Retired: passive income ROCKS

Just in case you don't like twiss's response, let me google that for you,

almostbob 866 Retired: passive income ROCKS

more detail needed
exactly what are you trying to accomplish, is there a single element, or do you want to know which of a number of elements is clicked
what code have you already
fixing code is a lot easier than writing code, so post what you have between [code=html] codes [/code] tags

almostbob 866 Retired: passive income ROCKS

pb's answer above, as the OP code print("<tr><td><a href='details.php?id=urlencode($id)'>$title</a></td></tr>"); because human readable text contains characters that mess up GET

almostbob 866 Retired: passive income ROCKS

your line 21 could be something like <td><a href='$title'>$title</a></td> assuming there is a field somewhere in the result array that includes a url if the title is not the url <td><a href='$result['url']'>$title</a></td>

almostbob 866 Retired: passive income ROCKS

Ive decided to post here in php forum because i use php to access the mysql table that holds the registered username and password.

Ajax is how most, allow javascript, clientside, to interact with php, on the server, where JavaScript does not operate with much efficacy.
so why not,
given that you have not written a new language construct to release to the world,
repost the question in the language forum devoted to allowing Javascript to interact with php/sql

2 bricks

almostbob 866 Retired: passive income ROCKS

I dunno, there are heaps of IDEs that support dozens of languages, which ones support shtml have dropped out ouf sight because asp and php do everything ssi does, and more so ssi has been ignored
NetBeans though supports everything else, so may be a place to start for ssi
I have WAMP installed on my pc and it will parse .shtml files as they should be on the localhost, so WAMP may be a possiblility

almostbob 866 Retired: passive income ROCKS

the next logical development is php, ssi on steroids,& a gazillion apps code samples downloadable scripts, a half a gazillion IDEs so you can test, free for the download
but it depends on the host, if you have a MS host asp is the one, most hosts are nix of some sort, apache so php is installed
php & mysql, or asp sql both work, different approach, same result

none of the pages of this site exist as hard coded files and google shows a million results, generated by php and dont really exist, but are searchable and linkable et al, and customize on what the visitor searches for
DaniWeb runs on a script vBulletin I think
Wordpress & a heap of others
much easier than hand coding anything, even if you just use the ideas, there is proven logic to use

HeadSlap moment,RE: natural flow,, screws up more web pages than you could imagine, each browser interprets natural completely differently, what looks cool on the development pc, looks wierd on others becuase each browser renders the layout on its own, IE puts margins on the inside, FF puts margins on the outside, safari does something different again, tell them what you want it to look like, they screw up less, and you get a consistent(not identical but recognizable) design

*HeadSlap Mmoment:noun; sudden enlightenment, assault excluded, see also Doh moment; I HATE overhead lightbulbs :P

almostbob 866 Retired: passive income ROCKS

A::
the server is set up to parse some file extensions for serverside commands
eg. setup to only process cgi shtml php asp to use includes in your default.htm page it would have to be renamed default.shtml, when you make the change, remember to change the href in links that point to the homepage
B:: the code that you want replicated is likely to be Header, footer, menu, ads if used, all those items are css positioned in each page, their position is set in the external css file
so if your include file has

<div class='header'>blka bla bla bal</div>
<div id='menu'><ul id='menu'><li>item</li><li>item</li><li>item</li><li>item</li><li>item</li></ul>
</div>
<div class='footer'>&copy;me | contact me | why me | why not</div>

and the css file is set

.header {top:0; bottom:auto; width:100%; position:fixed; z-index:10;}
.footer {top:auto; bottom:0; width:100%; position:fixed; z-index:10; }
#menu {list-style:none; /* bla bla style a ul to be a css menu didnt paste it  lazy */ }

the positions of the included items will be identical on each page, whether the include is first, last, or anywhare in the file
all your includes can be in a single file if you wish
or all the common includes in one file, and any specific items for a specific page, in other files

all codes just samples not tested

almostbob 866 Retired: passive income ROCKS

or you can have this page BE products.php if the $_get values arent set

<?php if(isset($_GET['x'])) {
$prodarr = array('prod1' => 'A', 'prod2' => 'B','prod3'=> 'c'); 
$keyarr = array_keys( $prodarr); 
if(in_array($_GET['x'],$keyarr)) { header( 'Location: http://www.website'.$prodarr[$_GET['x']].'com?x='.$_Get['x'].'&hop='.$_GET['hop']);  }}
include('http://www.website.com/products.php'); ?>
almostbob 866 Retired: passive income ROCKS

the benefits of code highlighting, I didnt use one, so left out a cloasing baracket

if(!in_array($_GET['x'],$keyarr)) { header( 'Location: http://www.website.com/products.php'); }

everything after that is wrong,
tighter code

<?php if(isset($_GET['x'])) {
$prodarr = array('prod1' => 'A', 'prod2' => 'B','prod3'=> 'c'); 
$keyarr = array_keys( $prodarr); 
if(in_array($_GET['x'],$keyarr)) { header( 'Location: http://www.website'.$prodarr[$_GET['x']].'com?x='.$_Get['x'].'&hop='.$_GET['hop']);  }}
header( 'Location: http://www.website.com/products.php'); ?>


if x is set
create fast search array of the products (great for huge product lists, I expect your business to grow)
check search array for x, on my wamp install, creating the key array is faster if there are more than 10 products than searching the 2 element array
if x found in array go to the the page,
goto default page

almostbob 866 Retired: passive income ROCKS

at or about line 3 where the comments fall

if(!in_array($_GET['x'],$keyarr) { header( 'Location: http://www.website.com/products.php'); }
almostbob 866 Retired: passive income ROCKS

ssi includes in shtml
includes in asp
includes in php
by far most people have common page elements in header footer menu sidebar includes

almostbob 866 Retired: passive income ROCKS
<?php if(isset($_GET['x'])) {
$keyarr = array('prod1' => 'A', 'prod2' => 'B','prod3'=> 'c'); /* an unlimited number of codes, linked to parts of website names
I hit abc, but they could be everything of the name, or as much as is needed to differentiate
cookie handling out of the php manual */
header( 'Location: http://www.website'.$keyarr[$_GET['x']].'com?x='.$_Get['x'].'&hop='.$_GET['hop']); 
}
else header( 'Location: http://www.website.com/products.php'); ?>

just a possibility

almostbob 866 Retired: passive income ROCKS

the code is wrong, those redirects belong in the <head>, but why ???
do a php redirect on the server, and seamlessly display only the correct page no html required

<?php if(isset($_GET['x'])) {
if($_GET['x'] == "prod1") { header( 'Location: http://www.websiteA.com'); }
elseif($_GET['x'] == "prod2") { header( 'Location: http://www.websiteB.com'); }
elseif($_GET['x'] == "prod3") { header( 'Location: http://wwwwebsiteC.com'); }
}
header( 'Location: http://www.website.com/products.php'); ?>

nothing but the correct page will be output to the browser

almostbob 866 Retired: passive income ROCKS
echo "<p>$_POST['name'] of $_POST['school'] has scored an average of .$_POST['marks'] percent. ".($POST['sex']=='f' ? 'Her' : 'His')." grade is :- $grade.</p>";

coffee's drunk, break over

almostbob 866 Retired: passive income ROCKS

just playing while the coffe brews,
the only thing I really noticed, was the difference in fieldnames in the original code
the html form inputs 'avg'
the php form processor validates on $_POST
= always rejects

added some (bad) code that populates the form with partial values more as an exercise than with any real consideration of whether it was valid

<?php 
include("header.html");
include("nav.html");
include("sidebars.html");
if(isset($_POST['submitted'])) {
	if((isset($_POST['name']))&&(isset($_POST['school']))&&(isset($_POST['marks']))&&(isset($_POST['sex']))) {
		if($_POST['marks']>=80)	 $grade='A';
		elseif(($_POST['marks']>=70)&&($_POST['marks']<80)) $grade='B';
		elseif(($_POST['marks']<70)&&($_POST['marks']>=60)) $grade='C';
		else $grade='D';
		echo "<p>".$_POST['name']." of ".$_POST['school']." has scored an average of ".$_POST['marks']." percentage. His/Her grade is :- ".$grade."</p>"; 
	exit(0); 
	} 
	else echo 'submitted form was not complete';
	}

function calendar() {
	$month=array(1=>"January","February","March","April","May","June","July","August","September","Ocotber","November","December");
	$days=range(1,31);
	$years=range(1900,2011);
	echo "Date of Birth : ";
	echo '<select name="month">';
	foreach($month as $key=>$value){
		echo "<option value='$key'";
		if(isset($_POST['month'])){if($key==$_post['month']) echo "selected='selected'";}
		echo '>$value</option>';
		}
	echo "</select>";
	echo '<select name="days">';
	foreach($days as $key=>$value){
		echo "<option value='$key'";
		if(isset($_POST['days'])){if($key==$_post['days']) echo 'selected="selected"';}
		echo ">$value</option>";
		}
	echo "</select>";
	echo '<select name="year">';
	foreach($years as $key=>$value){
		echo "<option value='$key'";
		if(isset($_POST['year'])){if($key==$_post['year']) echo 'selected="selected"';}
		echo ">$value</option>";
		}
	echo '</select><br /><br />';
	}	
?>
<form action="test.php" method="post">
<fieldset>
<legend>Form 1</legend>
Name : <input type="text" name="name" size="35" <?php if(isset($_POST['name'])){echo "value='$_POST['name']'";} ?>/><br /><br />
School : <input type="text" name="school" size="35" <?php if(isset($_POST['school'])){echo "value='$_POST['school']'";} ?>/><br /><br />
Avg. Marks : <input type="text" name="marks" size="4" <?php if(isset($_POST['marks'])){echo "value='$_POST['marks']'";} ?>/><br /><br />
Sex : <input type="radio" name="sex" value="m" />Male <input type="radio" name="sex" value="f" />Female<br /><br /> <!-- something similar to add selected='selected' -->
<?php calendar() ?>
<input type="submit" name="submit" value="Submit Form" />
<input type="hidden" …
almostbob 866 Retired: passive income ROCKS

for a radio button you may need to use the onclick attribute inside the <button > definition onclick="framename.location='pagename';" onclick="parent.framename.location='pagename';" onclick="document.framename.location='pagename';" something jumps out at me about needing to include the parent or document in the name, one of these should work

almostbob 866 Retired: passive income ROCKS

instructions for the lazy

instructions of the obscenley lazy <A href='filename' target='framename'>OPEN THIS LINK IN A FRAME</a>

almostbob 866 Retired: passive income ROCKS

css style

a:link {text-decoration:none; }
a:hover { }
a:active { }
a:visited { }

Rtfm
Read
the
Fine
Manual

almostbob 866 Retired: passive income ROCKS

the DOM you dont recognize is for early netscape & mozilla based browsers,

good practice to support everything, especially when its only a single line of conditional code
belt and braces, versions of mozilla based browsers(firefox) for linux BEOS etc do not support getelementbyid
in a few computer centuries (months), such support will be unncessary, but till everybody uses the same windows12 and ie33, , ,
its good practice to ensure compatibility with other OS/browser combinations
link <-- humor I enjoy the animation

almostbob 866 Retired: passive income ROCKS

keywords must relate to site text
keyword farms, get blacklisted from se results

almostbob 866 Retired: passive income ROCKS

floatval() is to convert the text variable to a numeric <form method=get action="Grade.php"> should be <form method='get' action="Grade.php"> dependant on html doctype used, it makes a big difference

almostbob 866 Retired: passive income ROCKS
<button id="frorm" onClick="showIt('layer1');">OPEN</button>
<script type="text/javascript">
<!--
(document.getElementById) ? dom = true : dom = false;
function hideIt(ID) {
if (dom) {document.getElementById(ID).style.visibility='hidden';}
if (document.layers) {document.layers[ID].visibility='hide';} }
function showIt(ID) {
if (dom) {document.getElementById(ID).style.visibility='visible';}
if (document.layers) {document.layers[ID].visibility='show';} }
--></script>
<div id="layer1" style="position:fixed; left:10px; z-index:10; width:50%; visibility:hidden; padding:10px; margin:10px; background:#ececec; border: 1px solid;">
<button id="form1" onclick="hideIt('layer1');">Close</button>
<br>lorem ipsum bla bla bla bla bla bla bla bla lorem ipsum bla bla bla bla bla bla bla bla bla bla bla lorem ipsum bla bla bla bla bla bla bla bla lorem ipsum bla bla bla bla bla bla bla bla lorem ipsum bla bla bla bla bla bla bla bla lorem ipsum bla bla bla bla bla bla bla bla<br>
<button id="form" onclick="hideIt('layer1');">Close</button></div>

multiple divs can be hidden.shown by their id
styling belongs in the stylesheet, this sample is not optimal

almostbob 866 Retired: passive income ROCKS

show the code used to call the file,
is ?n1text=60 in the link
is $_get the right array, $_post $_request ?

almostbob 866 Retired: passive income ROCKS

try

<?php $A=floatval($_GET['n1text']); // if it is not possible for $a to have a decimal component or if the decimal part is not significant intval() can be used
if($A>=60) { echo "Congrats!!!<br>Grade1"; }
elseif($A <60 and $A >= 40) { echo "Grade2";  }
else { echo "Fail"; } ?>

60 was excluded in the op, > 60 or < 60, no =60

$a is likely being treated as text, by convention all the request arrays are parsed as text, so the original value may be interpreted as "60"

almostbob 866 Retired: passive income ROCKS

thats easier, I thought you wanted them all to adjust
to make one column absorb all the width of the 100% make the first cell in that column <td width='*'>content</td> it should then occupy the entire table except for the width actually used by the other cells

ko ko commented: Nice post @almostbox. You are master with table. It is appreciate for me too. I am still stupid in table. :) +6
almostbob 866 Retired: passive income ROCKS

rephrased,
to the limits of the table size which in this case is set to full window width (100%)
if you want the whole table to adjust, remove the width statement from the table declaration and each column will adjust to its widest content
tables do not work that way, the column is the width of the widest cell in the column, the row is the height of the highest cell in the row,
the table is a collection of squares, even if the cell in column1 row3 is 3characters wide
column one, and therefore all the cells within in will be the width of the cell in column1 row4 which is 40 characters wide
the column or row fits 'tightly' around the largest column,

examine style text-align:right; on the columns containing the names

almostbob 866 Retired: passive income ROCKS

tables dont work that way
tables present tabular data in tabular form, SQUARE
the column is the width of the largest cell
the row is the height of the largest cell

If you dont want a square layout, dont use tables

almostbob 866 Retired: passive income ROCKS

1 find a problem
2 develop a solution
3 make sure solution WORKS
awesome

almostbob 866 Retired: passive income ROCKS

I dont indent, I use a code highlight editor the whitespace added to the files that may double it is unnecessary,
Move the elements that you want to position outside of other positioned elements
else all dimensions are relative to the outer element, not to the window as you expect
css shoved in the header, just to single file it on my laptop, being lazy

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xlmns="http://www.w3.org/1999/xhtml">
<head>
<title>Dark Empire Forum</title>
<style type='text/css'>
body{ /*float:left;*/ width:100%; height:100%; padding:0; margin:0; background:black; /*overflow-x: hidden;*/ }
#header{ position:fixed; /*float:left;*/ color:yellow; text-align:center; width:100%; background:transparent; z-index:10; }
#footer{ position:relative; float:right; bottom:0; padding:1pt 0; color:yellow; text-align:center; width:100%; background:transparent; }
.main{ margin-top:3em; margin-right:0; background:black; padding:0; z-index:-3; }
#content{ position:relative; float:left; width:80%; height:100%; background:red; padding-left:2em; padding-top:2em; padding-bottom:2em; margin-bottom:.1px; /*padding-right:2em;*/ border-top-left-radius:25px; moz-border-radius-topleft:25px; border-bottom-left-radius:25px; moz-border-radius-bottomleft:25px;} 
#info{ position:fixed; right:0; width:12%; height:100%; color:white; margin-top:2em; padding:3em 2em; background:black; border-top-left-radius:25px; moz-border-radius-topleft:25px; border-bottom-left-radius:25px; moz-border-radius-bottomleft:25px; }
#navigation{ position:relative; float:left; width:13%; padding:15px; height:100%; color:white; background:transparent; }
</style></head>
<body>
<div id="header">
<p>Will contain random features like the log in/out link, etc</p></div>

<div id="info">
<p>Useful information will hopefully go here</p>
<p>Things like:</p>
<ul>
<li>Total user count</li>
<li># of users on currently</li>
<li>Total number of threads</li>
<li><SCRIPT>document.write(Date()+".")</SCRIPT></li>
</ul>
</div>

<div class="main">
<div id="navigation">
<img src="./imgs/forum-icon.png" width="120" height="90" alt="Basic logo" />
<h1>Dark Empire</h1>
<ul>
<li>Signup link</li>
<li>Homepage linkydink</li>
<li>Search linkydink</li>
</ul>
</div>
<div id="content">
<img src="./imgs/squirrel-sith-lightning.jpg" width="400" height="300" alt="Random opening picture" />
<img src="./imgs/squirrel-sith-lightning.jpg" width="400" height="300" alt="Random opening picture" />
<img src="./imgs/squirrel-sith-lightning.jpg" width="400" height="300" alt="Random …
almostbob 866 Retired: passive income ROCKS

post the code, all of it, properly, dont waste the time of people you want to help you

almostbob 866 Retired: passive income ROCKS

from the css, the hidden text is placed inside a <p> inside a <div> or <p> with the id='*slope*'

(using DOS convention * represents any string of characters eg threeslope slope2 as per the css file
example

<div id='threeslope'>this text should always display<p> this text should display when you click the original text and the div expand to display it </p>this text should display always also</div>

google 'stu nicholls' from memory he is the author of the slopes menu and slopes flyout