almostbob 866 Retired: passive income ROCKS

Try
http://www.plus2net.com/asp-tutorial/form-checkbox.php
the proceess for checkbox & multi select may be similar

almostbob 866 Retired: passive income ROCKS

google for css dropdown menu vertical
it is just a css formatted <ul><li></li></ul>
the contents of the <li> are the links or a submenu of another <ul>
the css for the mouseover effects is something like

ul.li {margin:10px;}
ul.li:hover { margin-left:20px;}
ul.li.a:hover { margin-left:20px; background:eeeeee;}
almostbob 866 Retired: passive income ROCKS

Thank a lot for xan and almostbob,

I have redesign my table to store the datetime into time stamp so it will be faster. Actually I have store it into varchar because my user prefer (d-m-Y) format than (Y-m-d).
Ok , thank a lot for your advices. It helps me lot

unix time is a number, not a varchar
it is 10 digits representing the number of seconds from 1/1/1970
February 9 had/was 1234567890, oclock in Unix time
Storing a varchar will not speed up operations or make the database smaller
the improvement comes from storing a timestamp [int(10)] and operating on it. You only need to parse the timestamp to human -readable on output, which is much faster, and you can with no further effort have output forms in ymd dmy mdy or any other user configured form
ignore completely the "date" data type, the data in its simplest form, is a number.

almostbob 866 Retired: passive income ROCKS
almostbob 866 Retired: passive income ROCKS

saveimage.php

<?php if(!$file) return false;
header("Content-disposition: attachment; filename=$file");
header('Content-type: image/jpeg;');
readfile("$file");
?>

image link

<a href='saveimage.php?file=hires/image.jpg'><img src='lowres/image.jpg' alt='click to save hires image'></a>
almostbob 866 Retired: passive income ROCKS

[code=pet peeve]
sql time or php date are 10 decimal digits representing the number of seconds from 1/1/1970 (doh,, 1970 or 1980? )
human readable representations of date() or time() are unneccessary and waste processor time
the computer uses digits better than text representations
thus time() + 300 = five minutes from now
thus date() + 3600 = one hour from now
storing timestamps in database, cookies or sessions is much more efficient, than strtotime()-ing a text string to work with it, then formatting the time back as a text string.,

almostbob 866 Retired: passive income ROCKS
if (!strpos(#_post['textbox'],'http://') == 0) { return false}

/* return false can be any thing, have successfully used header("location: $_server"); to bounce incorrectly filled pages back */ }
or javascript can check similarly in the <form onsubmit='javascript'> before submission

almostbob 866 Retired: passive income ROCKS

If this is actually copied from your html file you may want to close the link

<link rel="stylesheet" type="text/css" href="style.css" /
<link rel="stylesheet" type="text/css" href="style.css" />

and complete the html declaration and doctype so that the styles you are choosing, actually work
W3c Recommended list of DTDs

almostbob 866 Retired: passive income ROCKS

the javascript needs to know which buton has been clicked, as the processing differs slightly.

<script type='text/javascript'>
<!--
function validate(text) {
if (text=='process1' ) {/* do something*/}
else {/* do something else*/ }
}
-->
</script>
<form onsubmit='validate("submitbtn");'>
<!-- bla bla -->
<input type='submit' name='submitbtn' value='process1'>
<input type='submit' name='submitbtn' value='process2'>
</form>

unchecked code, thought process only

almostbob 866 Retired: passive income ROCKS

you do not need <?php ?>
this is a html block
in your php file you can

<?php
//bla bal bla php code
?>
html code block
bla bla
<?php //continue php
//or
echo "html block";
//or
print<<<END
html block
END;
?>

all of which will put the javascript into the php file without error
You need to read more of the php manual

almostbob 866 Retired: passive income ROCKS
<script type="application/javascript">
<script type="text/javascript">
function hello() { alert("Hello It works"); }
</script>]
<input type='button' name='Release' onclick='hello();' value='Click to Release'>
almostbob 866 Retired: passive income ROCKS
button { background-color: #e4e0d8; } 
button:hover { background-color: #66cdaa; } 
button:active { background-color: #66cdaa;  } 
button:focus { background-color: #66cdaa; } 
form { PADDING: 1px; margin: 1px; }
img { border: 0px; }
input { background-color: #efefef; border: 0px; border-bottom: 1px solid #000000; }
input:hover { background-color: #dfdfdf; }
input:focus { background-color: #dfdfdf; border-bottom: 1px solid #101010; }
input:active { background-color: #dfdfdf; border-bottom: 1px solid #101010;}
input[type=button] { background-color: #e4e0d8;  }
input[type=button]:hover { background-color: #66aaaa; }
input[type=button]:focus { background-color: #66cdcc; }
input[type=button]:active { background-color: #66cdff; }
input[type=submit] { background-color: #e4e0d8;  }
input[type=submit]:hover { background-color: #66cdaa; }
input[type=submit]:focus { background-color: #66edea; }
input[type=submit]:active { background-color: #669d9a; }

snipped from my .css I dont use images slows down loading, here in rural dial up land, but css four state works for inputs

almostbob 866 Retired: passive income ROCKS

a submit button 'onmousedown' is onsubmit in the parent <form>
a submit button has no 'onmouseup' because the form has already been submitted,

almostbob 866 Retired: passive income ROCKS

only if the original image is as large as the largest dragable size.
increasing the size of the image beyond its actual size creates interpolated pixels, 'best fit of color' that may not be correct or creates visual pixels that are multiple screen pixels in size, 'blocky' images.
If the image is initially served at a small size,
a larger image can be background loaded by a script,
page times are not impacted,
the effect can be seamless.
example code only, not checked or correct
where "onresize" is some defined action havent bothered to code

<!doctype>
<html>
<head>
<script type='text/javascript'>
<!--
function imageload() { something to load hi res images }
function onresize() {something to handle image dragging}
--></script>
</head>
<body onload='imageload()'>
<img src='thumbsize.jpg' onresize='self.src="fullsize.jpg"' alt='drag to resize image'>
</body></html>
almostbob 866 Retired: passive income ROCKS

I have a table with the following date field entry named datetime:
07-05-2009
Which I am assuming is an entry for 07-05-2009 (d/m/Y)

or it could equally be m-d-y
thats the other reason why dates and times should be stored as a timestamp
timstamp is smaller faster and un-ambiguous

Will Gresham commented: +1, completely forgot that point :) +2
almostbob 866 Retired: passive income ROCKS

So I dont have to edit anything using this? It will do everything automatically for me?

yep
and its a tight script too

almostbob 866 Retired: passive income ROCKS

In your pages that should be in your iframe

<script type='text/javascript'>
<!--
if(self.location==top.location) top.location.replace('http://mysite.com?frame=' + self.location) ;
-->
</script>

I dunno what the form for html shtml pages is, never thought about it before but in php

<iframe src="<?php if(!$frame) {echo 'main.html';} else {echo $frame; } ?>" frameborder='0' width='100%' height='900'></iframe>
almostbob 866 Retired: passive income ROCKS
almostbob 866 Retired: passive income ROCKS

i have seen many form if some one press the button it takes to the other page also it sends tha data?

well Yeah, php form processing is in the target page not the form page
and validation failure is something like
if !$post['variable'] {header ("location: $_SERVER['http_referer']"); }[code=php]if !$post {header ("location: $_SERVER"); }

almostbob 866 Retired: passive income ROCKS

shtml php asp would be so much easier to code than trying to 'dynamic' the iframe.
just one line of code in each page file, and change the extensions to
.shtml

<!--#include virtual="/mainmenu.html" -->

.php

<?php include('/mainumenu.html'); ?>

.asp

// dunno never used it

for whatever scripting language the hosting account supports.
This one, the solution,
is easier than it appears looking forward,
looking back, piece of cake

or -use a frameset

<frameset rows='160,*'> <!-- top menu --><!-- or --><frameset cols='160,*'> <!-- left menu -->
<frame id='menu' src='mainmenu.html'>
<frame id='main' src='reikiwhatever.html'>
<noframes>If frames disabled this text appears</noframes
</frameset>

where mainmenu.html <a> s include target="main" to open them in the other frame
there will be then only a single page scrollbar

almostbob 866 Retired: passive income ROCKS
<a href='' target="main" onclick='window.main.src="page1.html";window.left.src="submenu1.html";'>Page 1</a>
<br><a href='' target="main" onclick='window.main.src="page2.html";window.left.src="submenu2.html";'>Page 2</a>
<br><a href='' target="main" onclick='window.main.src="page3.html";window.left.src="submenu3.html";'>Page 3</a>
<br><a href='' target="main" onclick='window.main.src="page4.html";window.left.src="submenu4.html";'>Page 4</a>
<br><a href='' target="main" onclick='window.main.src="page5.html";window.left.src="submenu5.html";'>Page 5</a>
<br><a href='' target="main" onclick='window.main.src="page6.html";window.left.src="submenu6.html";'>Page 6</a>
<br><a href='' target="main" onclick='window.main.src="page7.html";window.left.src="submenu7.html";'>Page 7</a>

all of which would be completely irrelevant, if you used a more modern design with a css menu system and no frames

almostbob 866 Retired: passive income ROCKS

If you have a really large script with a single error you could post just the relevant section, and comments & suggesstions would reference the 'right' part of your source code
"try {x}|bla bla in line 502"

if you made as many mistakes as me, you would see the need immediately :twisted:

Ancient Dragon commented: right :) +36
almostbob 866 Retired: passive income ROCKS

order is important in css
in some of the styles you set

margin-top:0;
margin:5px;

result margin-top:5px; in other styles you correctly zero the top margin

margin:5px;
margin-top:0;

a group of applied 5px will soon add to the 'missing' amount

almostbob 866 Retired: passive income ROCKS

or you can do it the lazy way and lookup a sitemap generator

http://www.auditmypc.com/free-sitemap-generator.asp

almostbob 866 Retired: passive income ROCKS
<frameset rows="15%, 85%">
<frame id='head' name='head' src='head.html'>
<frameset cols="20%,60%,20%">
<frame id='left' name='left' src='left.html'>
<frame id='main' name='main' src='main.html'>
<frame id='right' name='right' src='right.html'>
</frameset></frameset>

left.html=

<a href='page1.html' target="main">Page 1</a>
<br><a href='page2.html' target="main">Page 2</a>
<br><a href='page3.html' target="main">Page 3</a>
<br><a href='page4.html' target="main">Page 4</a>
<br><a href='page5.html' target="main">Page 5</a>
<br><a href='page6.html' target="main">Page 6</a>
<br><a href='page7.html' target="main">Page 7</a>

giving the <a> elements a target should do it

almostbob 866 Retired: passive income ROCKS

I could only answer, the 'other options' part
:)
I had no reason to reinvent the wheel
The search results from Freefind are good, and are template/css/script styleable to the site

almostbob 866 Retired: passive income ROCKS
almostbob 866 Retired: passive income ROCKS

the marquee extension behaves like that, exits the display area before restarting,
this prior thread http://www.daniweb.com/forums/thread180864.html may help

almostbob 866 Retired: passive income ROCKS

[Rant = Slightly off topic, My favorite Subject]

simplify the database
change any text dates "October 15 2008"(smalltext 15 characters) etc to timestamps
strip out the $signs
you only need them when you print out information echo '$ '.$extPrice; is just as fast and causes no $_ errors
the database should contain
no formatting
no text dates or times
nothing but data in its simplest form,
its easier to manipulate, smaller, faster, cheaper to maintain
and you can calculate on the fields, which is more difficult to do with text representations,
not so much now for 50 items, 50Bytes extra per row isnt much
but when the db grows to 500 000 items and there are millions of transactions in the transaction table, 50Bytes per row is a lot

[/Rant]

almostbob 866 Retired: passive income ROCKS

Cool ,

almostbob 866 Retired: passive income ROCKS

Check the settings on your xampp installation. the root of the address is your loacal host

the link is opening in the current folder, your localhost, because you havent told it not to
www.intel.com is not a web link, without the protocol http:// it is a local link

Good solution store the full correct link in the database, as http://www.intel.com
many sites are not accessed at www
bad solution change the code echo "<td><center><a href=\"http://www.$url\">$link</center></td></a>"; bad because images.coogle.com ww2.ca.com and many other subdomainss that do not sit on www

roughly equivalent to not putting a drive specfier when on the local computer
z:\image.jpg will work
image.jpg fails

almostbob 866 Retired: passive income ROCKS
<div style=" text-align:center; margin-left:2%; color:#333333; font-family:Arial, Helvetica, sans-serif; font-weight:600">
<div style="margin-left:3%; text-align:center;">
<label for='temp_IdDropDown'>Temp ID</label><br />
<select name="temp_IdDropDown">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</div>
<div style='text-align:right;'>
<label for='lastNameDropDown'>Last Name</label><br />
<select name="lastNameDropDown">
<option value="LastName1">LastName1</option>
<option value="LastName2">LastName2</option>
<option value="LastName3">LastName3</option>
</select>
</div>
<div>
<label for='firstNameDropDown'>First Name</label><br />
<select name="firstNameDropDown">
<option value="FirstName1">FirstName1</option>
<option value="FirstName2">FirstName2</option>
<option value="FirstName3">FirstName3</option>
</select>
</div>
<br />
<div style="text=align:center;">
<input type="submit" name="search" id="search" value="Search" />
<input type="reset" name="resetForm" id="resetForm" value="Reset" />
</div>
</div>

if you position every element separately, they dont line up
.3 % of 200px part screen window is 0.6px
.8 % of 200px ditto is 1.6px
.3 % of 2160px full screen window is 6px
.8 % ditto is 18px
position the container

almostbob 866 Retired: passive income ROCKS
<iframe frameborder='0' src='footer.html' width='100%' height='height of footer in px'>footer</iframe>
<?php include('footer.html'') ?>
<!--#include file="footer.html" -->
<!--#include virtual="footer.html" -->
<object data="footer.html" type="text/html" width="100%" height='height of footer in px'> 
alt : <a href="data/test.html">test.html</a> 
</object>
almostbob 866 Retired: passive income ROCKS
<style>
.left {width:33%; float:left; text-align:left;}
</style>
<div class='left' >
<label for='country'>Country</label><br/>
<select onchange='javascript populate state-province selector' name='country' id='country'>
<option selected='selected' value="">Choose</option>
<option value='the lucky country'>Australia</option>
<option value='winter home for hockey'>Canada</option>
<option value='strange'>America</option>
<option value='I like the feel of tulips'>Nederlands</option>
</select>
</div>
<div class='left'>
<label for='state'>State/Province</label><br>
<select id='state' name='state' onchange='javascript populate city selector'>
<option value="">Select Country First</option>
</select>
</div>
<div class='left'>
<label for='city'>City</label><br>
<select id='city' name='city'>
<option value="">Select Country First</option>
</select>
</div>
almostbob 866 Retired: passive income ROCKS

You install MYSQL on apache
equivalent I think to installing acess on windows
you can run MYSQL on other web servers, on windows, on OS10, but there has to be an underlying OS

csharplearner commented: Thank you for the explaination +1
almostbob 866 Retired: passive income ROCKS

This code in function viewallusers_display_addon_page()

$sql = "SELECT userdb_user_name, userdb_id, userdb_user_first_name, userdb_user_last_name FROM " . $config[table_prefix] . "userdb where userdb_is_agent = 'yes' order by userdb_user_name";

selects the entire db and outputs it
so it should go somewhere just above there
and

$sql = "SELECT userdb_user_name, userdb_id, userdb_user_first_name, userdb_user_last_name FROM " . $config[table_prefix] . "userdb where userdb_is_agent = 'yes' order by userdb_user_name limit ". $limit." offset ".($limit * $page);

and the selector "id" in the tutorial script be the unique id column

I really don't know how it will work,
as long as the testing isnt done on your production server, you can hash with it until it works right

almostbob 866 Retired: passive income ROCKS

No
This code, that works,
came from the first result google search for 'php pagination tutorial'
If you cannot understand the tutorials you need to read and learn a bit before you continue.

dammit, too late to edit
read my own post and there is some missing

left off ....

The tutorial I looked through included a section in integrating the tutorial into your existing script

almostbob 866 Retired: passive income ROCKS

Thats why its wrapped in [rant][/rant] tags,
may not be strictly relevant to this post, sorry,
I get so many 'fix my database requests',
where the data is input with dollar signs,
as text dates
as proprietary codes
then the user wonders why it dont work

almostbob 866 Retired: passive income ROCKS

No
This code, that works,
came from the first result google search for 'php pagination tutorial'
If you cannot understand the tutorials you need to read and learn a bit before you continue.

almostbob 866 Retired: passive income ROCKS
Select * from software order by TAGNUM, PACKID
almostbob 866 Retired: passive income ROCKS

From a prior thread
Check for new version
(I thought once, now I just paste)

diafol commented: Nice one AB - thought fgc would fail for same reason as include. Doh! +3
almostbob 866 Retired: passive income ROCKS

[Rant = My favorite Subject]

simplify the database
change any text dates "October 15 2008"(smalltext 15 characters) etc to timestamps (Int(10))
strip out the $signs
you only need them when you print out information echo '$ '.$sPrice; is just as fast and causes no $_ errors
the database should contain
no formatting
no text dates or times
nothing but data in its basic form,
its easier to manipulate, smaller, faster, cheaper to maintain
and you can calculate on the fields, which is more difficult to do with text representations,
not so much now for 50 items, 50Bytes extra per row isnt much
but when the db grows to 500 000 items and there are millions of transactions in the transaction table, 50Bytes per row is a lot

[/Rant]

almostbob 866 Retired: passive income ROCKS
<?php
$LIMIT = 40;// Entries Per Page
If (isset($_GET[‘page’])) {
  // Get Current page from URL
  $page = $_GET[‘page’];
  If ($page <= 0) {
    $page = 1;     // Page is less than 0 then set it to 1
  }
} else {
  $page = 1;  // URL does not show the page set it to 1
}
$strqry = “select id from MyTable”; // Create MySQL Query String
$query = mysql_query($strqry) or die("MySQL Error: <br /> {$strqry} <br />", mysql_error());
$TOTALROWS=mysql_num_rows($query);// Get number of rows returned
$NumOfPages = $TOTALROWS / $LIMIT; // Figure out how many pages there should be based on your $LIMIT
$LimitValue = $page * $LIMIT – ($LIMIT);// This is for your MySQL Query to limit the entries per page
?>
<div id="paginating" align="right">Pages:
<?php
If ($page == ceil($NumOfPages) &amp;&amp; $page != 1) {
// Check to make sure we’re not on page 1 or Total number of pages is not 1
 for($i = 1; $i <= ceil($NumOfPages)-1; $i++) {
 // Loop through the number of total pages
  if($i > 0) {
  // if $i greater than 0 display it as a hyperlink
   echo "<a href=\"/{$i}\">{$i}</a>";
  }
 }
}
If ($page == ceil($NumOfPages) ) { $startPage = $page; } else { $startPage = 1; }
for ($i = $startPage; $i <= $page+6; $i++) {
 if ($i <= ceil($NumOfPages)) {
 // $page is not the last page
  if($i == $page) {
  // $page is current page
   echo " [{$i}] "; } else {
    // Not the current page …
almostbob 866 Retired: passive income ROCKS

W3 image map

<img src="image.jpg" width="145" height="126" alt="image" usemap="#map" />
<map name="map">
  <area shape="rect" coords="0,0,82,126" href="1.htm" alt="1" onclick onmouseover onmouseout ondblclick />
  <area shape="circle" coords="90,58,3" href="2.htm" alt="2" />
  <area shape="circle" coords="124,58,8" href="3.htm" alt="3" />
</map>
almostbob 866 Retired: passive income ROCKS

its not your local pc, thats insignificant, though its good if the development system is configured the same as the real host
mod_rewrite needs to be installed on the host, the server the site will be running on the www
test the .htaccess file given on the web server to see if the host has enabled mod_rewrite
if not enabled you may have to query your hosting company to have it enabled, most hosts do not allow you(me/them) to recompile the OS, for very obvious reasons.

almostbob 866 Retired: passive income ROCKS

Perhaps look into sessions, no experience to offer but.,,
it
logs them out of the server after time of no activity
whether they click the bye-bye button or no

almostbob 866 Retired: passive income ROCKS

to keep the generated html valid
echo "<li>$value</li>";[code=php]echo "<li>$value</li>";

almostbob 866 Retired: passive income ROCKS
<select name="products[]" multiple>

use

<select name="products" multiple>

its not an array, until its posted

almostbob 866 Retired: passive income ROCKS

the script & all other support,
you get from PayPal.com when you register

almostbob 866 Retired: passive income ROCKS
<input type='text' width=20 maxlength=20 value='12345678901234567890'>

http://www.w3schools.com/tags/tag_input.asp