Roberdin 9 Supreme Evil Overlord Team Colleague

Google Desktop Search seems to me a superior product, and also allows the index to be encrypted at a user's option.

Roberdin 9 Supreme Evil Overlord Team Colleague

This is not a problem with muting input channels or anything on my sound card.

Oh, and, I switched to a DVB-T card ages ago.

Roberdin 9 Supreme Evil Overlord Team Colleague

Well, I've searched Google to little avail so I've decided to ask here.

I've currently set up a Media Centre PC in my room. Everything - even wireless LAN - works perfectly after several kernel recompilations, that is, excepting my TV card. As you may imagine, this is somewhat of a disappointment considering it is a media centre. I'm using Linux Mandrake 10.1 Community and a 2.6.1-20 kernel.

Let me clarify, when I disable auto mute on the card, I hear a static, noise sound. I recieve a good video signal. The static noise changes slightly when I change channel which leads me to believe that it may be a problem with my TV standard - in the UK, we use PAL-I (instead of NTSC). This is not a problem with muting input channels or anything on my sound card.

DMESG output follows.

Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 247560k/253888k available (1857k kernel code, 5616k reserved, 793k data, 200k init, 0k highmem, 0k BadRAM)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay loop... 2375.68 BogoMIPS
Security Scaffold v1.0.0 initialized
SELinux:  Disabled at boot.
Capability LSM initialized
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: After generic identify, caps: 0383fbff c1cbfbff 00000000 00000000
CPU: After vendor identify, caps:  0383fbff c1cbfbff 00000000 00000000
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: …
Roberdin 9 Supreme Evil Overlord Team Colleague

from what i have research, there are some barcode scanner which is uSB and are keyboard wedge have built in decoders that can read several barcode types and send them via the keyboard so info scanned appears as if it has been typed. Therefore does it means that, if the user just scan a barcode into the textfield, the data can be retrieved using the normal way?

But what if the barcode scanner is non-USB and do not have keyboard wedge interface, can it be done using php? so is there any php scripts that have written for this function? can anyone help? Thanmks in advance.

What exactly are you trying to do? Surely this is a problem for the client interface, not the server?

Roberdin 9 Supreme Evil Overlord Team Colleague

A criminal offence in most countries, that is.

Though, obviously, obtaining stolen goods (which is essentiall what you'd be doing) is probably a criminal offence where you are as well, unless you live on an oil rig or something.

Roberdin 9 Supreme Evil Overlord Team Colleague

Again > More

Roberdin 9 Supreme Evil Overlord Team Colleague

Cool.

I knew that I'd forgotten one; Safari.

Roberdin 9 Supreme Evil Overlord Team Colleague

It would be helpful if you were to provide the error returned, or a description of what's not working correctly.

Roberdin 9 Supreme Evil Overlord Team Colleague

The second way will be quicker and easier.

You can use SQL to connect to you DB and search and sort, for example:

SELECT *
FROM userData
WHERE user_age > 30
AND user_type = 'NORMAL'
ORDER BY username ASC

The hereinbefore inserted query will, assuming that you have the table setup appropriately, select all fields from the UserData table - but only records where the user is over 30 and is of type 'NORMAL'. The records are sorted by username, ascending.

SQL (Structured Query Language) allows you do setup these queries easily and simply. PHP can then grab the results of the query and display it in a table, or any HTML that you like, really.

Roberdin 9 Supreme Evil Overlord Team Colleague

Anyone else here voting, or is everyone else browserless? ;)

Roberdin 9 Supreme Evil Overlord Team Colleague

Half the commands are commented...

Roberdin 9 Supreme Evil Overlord Team Colleague

This is unlikely to be the first thread of its kind and nor the last, but with the recent release of Firefox 1.0 final, it would be interesting to see how the current browser line up is.

Personally, I'm a Firefox fan.

Roberdin 9 Supreme Evil Overlord Team Colleague

PHP won't be interpreted on a MySQL server.
PHP scripts are interpreted on a PHP server, which may also be a MySQL server.

In any case, you may be aware that generally, a PHP script executes within miliseconds and the resultant data is then passed onto a webserver and onto the client while the PHP service goes idle or parses another script.

On Apache, multiple PHP service threads can be run simultaneously, meaning that many scripts can be interpreted and thus many more clients served in parallel.

I don't have exact figures, but generally the top figure is based on your hardware and OS configuration.

Roberdin 9 Supreme Evil Overlord Team Colleague

THere is a bult-in form creation wizard in Access. This will obviously limit data entry and retreival to one computer or possibly multiple clients on a LAN.

If you need remote Web Access as you imply, then you'll need something more complicated. Generally, Access is not good online as it's slow and cannot handle more than one request simultaneously. If you really want it, you can use it, but you should be aware that there are a raft of free database servers that are significantly faster online.

Roberdin 9 Supreme Evil Overlord Team Colleague

Speak -> Speech

Roberdin 9 Supreme Evil Overlord Team Colleague

Um, right... Moderator?


Gossip > Talk

Roberdin 9 Supreme Evil Overlord Team Colleague

Ah, calm down. The problem is that $HTTP_ x _VARS isn't enabled in PHP5. Ya need to change your php.ini file settings.

Roberdin 9 Supreme Evil Overlord Team Colleague

PHP is a dynamic programming language. It, for example, generated the page that your are viewing now.

Roberdin 9 Supreme Evil Overlord Team Colleague

You can't AFAIK.

Certainly not if the USB scanner is on a client machine rather than a server.
Moreover, I've never heard of an extension to do this.

If you merely wish to use the barcode scanner as input for a form, then you should surely have got drivers with the device that 'fool' the computer into thinking that it's a keyboard.

Roberdin 9 Supreme Evil Overlord Team Colleague

WHy do you need the number of rows?

Roberdin 9 Supreme Evil Overlord Team Colleague

In a loop, the break and continue keyworks work as in C; however, for IF I am not certain. Best to try them out and see what works, or check www.php.net

Roberdin 9 Supreme Evil Overlord Team Colleague

Yes; you can either do:

include("/home/.sites/88/site213/web/test_server/events1/web/ssi/{$pageName}_secondarynav.htm");

or

include('/home/.sites/88/site213/web/test_server/events1/web/ssi/' .$pageName . '_secondarynav.htm');
Roberdin 9 Supreme Evil Overlord Team Colleague

Actually it will. It's a valid result handle, irrelevant of its contents.

Roberdin 9 Supreme Evil Overlord Team Colleague

Are you syre that the query is returning a result?

Roberdin 9 Supreme Evil Overlord Team Colleague

Ah, I wasn't aware of this...

Roberdin 9 Supreme Evil Overlord Team Colleague
while ($type_row = mysql_fetch_array($sql_event_type_result)){

Should this not be as below? (mysql_fetch_array to mysql_fetch_row)

while ($type_row = mysql_fetch_row($sql_event_type_result)){
Roberdin 9 Supreme Evil Overlord Team Colleague

Sorry, what? I'm not quite sure what you mean there.

Unless your PHP.ini file has been explicitly modified to do this (register_globals = on), $_GET will NOT be the same as $page. $_GET is an array, containing the URI-passed values.

So, if you visit blah.php?foo=bar&bob=42

Then $_GET will equal 'bar', and $_GET will equal 42. $foo and $bob will be undefined; as $page was in Tip's original code.

Roberdin 9 Supreme Evil Overlord Team Colleague

But why would that in anyway affect the variable? I mean, all you are doing by using "$context" is saying to PHP:

I'm typing some text here, feed this into the parser. If you find any variables, then evaluate them.

So essentially it's evaluating $context, and then sending the results off to the include() function, as apposed to just sending it off; if you see what I mean...

Roberdin 9 Supreme Evil Overlord Team Colleague

To YoungTrek: I can't see any problems with the code, but then I don't tend to use the mysql functions directly. Try it out, see if it works.

As for MarCarNar, I'd suggest that you get a good grip of XHTML and CSS before you move on to PHP. If you're using Frontpage, then try using its HTML editing mode, where you type the page entirely in HTML as apposed to just typing then formatting using the buttons and have it generate the 'behind-the-scenes' code for you...

Roberdin 9 Supreme Evil Overlord Team Colleague

That is not the problem, at least with regard to the error specified. The problem is that you think that by visiting mysite.php?page=2, the variable $page will be set to 2. In the majority of circumstances (default since PHP 4.0.2, I believe), this (fortuantely, from the side of security) is false.

If you want to retrieve the variable page from your URL string, you need to access it with $_GET. So, while PoA is correct in noticing the missing <?php } ?> towards the end of your script, you also need to change

switch( $page ) {

to

switch( $_GET['page'] ) {

(Although, it's odd that the script should run at all - as it is apparently doing to produce a notice rather than a parse error - if there was a missing closing brace.)

Roberdin 9 Supreme Evil Overlord Team Colleague

Why bother enquoting $context in the include statement? Just slows down the parser...

Roberdin 9 Supreme Evil Overlord Team Colleague

Storing a picture in a database is generally a bad idea... they are usually designed for fast retrieval operations of small bits of data, not saving massive picture files.

Roberdin 9 Supreme Evil Overlord Team Colleague

The website that told you to use $PHP_SELF is severely out of date. Instead, use $_SERVER

Roberdin 9 Supreme Evil Overlord Team Colleague

It has to end in .php to be parsed by the PHP engine, change your file name back to PrintInfo.php.

The HTML code (within the PrintInfo.php code) will not be analysed by the PHP parser, bnut instead be sent straight to output. The PHP parser only reads between the <?php and ?> tags.

Roberdin 9 Supreme Evil Overlord Team Colleague

Well you'll have to tell me what level of experience you have... for example, would you recognise what the hereafter inserted code block does?

<?php

echo 'Hello, world!';

?>
Roberdin 9 Supreme Evil Overlord Team Colleague

Not exactly....
a) $HTTP_POST_VARS are out dated, use $_POST now; and
b) If you use comments to show things in REAL code, people will pick up what you're doing far faster than if you confuse them with fake code.

For example, you could so something like...

<?php

/* We'll start by showing the top of the page. We've already created the TOP of the page and saved in in a file called header.html (in the same directory as this file). We can use the include() function to 'include it' at the top of our page as follows: */

include('header.html');

// Now we will check, did the user find the secret page?
// We can do this using an IF block as follows:

if( $_GET['found_secret'] == 'yes' )
{
      // Here we can do what we want for our 'secret page'.
      // The user can get here by adding ?found_secret=yes to the
      // end of the page's URL. This part of the code, the bits
      // between the curly brackets, is only 'read' by the PHP engine
      // if the above statement is true.

      echo 'You found our secret <br />';
}

// Output footer...

include('footer.html');

?>

This could form a thrid or fourth tutorial in PHP, introducing IF blocks.

Roberdin 9 Supreme Evil Overlord Team Colleague

Or, if you (very wisely) do not have auto_globals enabled, then $_SERVER.

Roberdin 9 Supreme Evil Overlord Team Colleague

Really.

Coming Soon: Windows XP Service Pack 2
Microsoft is preparing to release a free update for Windows XP that provides better protection against hackers, viruses, and worms. The best way to ensure you get Windows XP Service Pack 2 when it is released is by turning on Automatic Updates today. You can use our step-by-step instructions or, if you prefer, let us do it for you.

Hmmmmm. Does anyone else find it odd that Microsoft would release an egarly awaited service pack to a thrid party site before its own?

Roberdin 9 Supreme Evil Overlord Team Colleague
require("$content");

This'll work, but it's a waste of the script interpreter's time:

require($content);

This is faster. (Without the double quotes this time - the double quotes tell the interpreter that there may be variables embedded in the string, and should evaulate those variables, so it goes searching for them. This takes marginally more time than knowing that they are there already. Obviously, it won't make much difference, but its good to know. )

Roberdin 9 Supreme Evil Overlord Team Colleague

A mistake I made was to assume that the PHP woukld work just by double cliking the file or opening it in its directory. You need to visit

http://localhost/path/to/your/file.php

Roberdin 9 Supreme Evil Overlord Team Colleague

For security reasons, you should use $_GET. $_GET is for URL variables. If it's form data, you'd need to use $_POST, and for Cookies, $_COOKIE. It's so that you know exactly where your variables are coming from.

To make it work in your code, you'll need to use

$result = mysql_query("SELECT * FROM TABLE_NAME WHERE FIELD_NAME='{$_GET['II']}'",$db);

The { } forces PHP to realise that there's a variable in there - you only need to use those for arrays in strings (like above).

Roberdin 9 Supreme Evil Overlord Team Colleague

Sounds Cool.

What's the catch :P

Roberdin 9 Supreme Evil Overlord Team Colleague

Erm...

Sorry about my above post. For some reason I got an email a few days ago about a reply being made to this topic. But, I've only just checked the date of Dani's post...

Roberdin 9 Supreme Evil Overlord Team Colleague
Roberdin 9 Supreme Evil Overlord Team Colleague

Sounds like that your query is pulling nothing. What I would do, is above the while() section of your code, add

$mapname = array();

This will force $mapname to be an array - otherwise, if your query pulls nothing, then the while() block won't be interpreted and hence your mapname is undefined. So when foreach() asks for it, it finds that its not an array and starts whining. Forcing $mapname to be an array will just mean that the foreach doesn't do anything if its empty.
Obviously, you need to put this code above wherever else that you may have used $mapname as it will destroy it first.
I do, however, have some concerns about your query.

`ship`='".$POST['ship']."'";

Should ship, not in fact be, m.ship or mn.ship?

Roberdin 9 Supreme Evil Overlord Team Colleague

A. Should you really be bumping old topics? ;)
B. Since when did I subscribe to this topic? *Regards Dani with suspicion*

I can tolerate one or two adverts per page, but any more and I start to go sligthly insane. The site layout and colour scheme are important to me because I'm lazy (links = easy to find) and like to be neat - anything ugly looking annoys me as well.

Unfortuantely for you, my pet hate is now websites which don't comply with W3C requirements*. Which also includes this topic page, so I will no longer be visiting it. :P However, your forum index seems good.

(* Yes, I'm aware that mine doesn't. But that's because I'm too lazy to do anything about it. I'm also equally aware that this is another example of hypocracy.)

Roberdin 9 Supreme Evil Overlord Team Colleague

Bah, both Yahoo and Microsoft have voiced objections to Google's crown... looks like Yahoo is getting more active, but personally; I'd rather trust Google's adverts near my emails than whatever Yahoo does with them.

Roberdin 9 Supreme Evil Overlord Team Colleague

Try replacing $PHP_AUTH_USER and $PHP_AUTH_PW with $_SERVER and $_SERVER respectively.

Roberdin 9 Supreme Evil Overlord Team Colleague

That's usually best. Saves a lot of hassle.

Roberdin 9 Supreme Evil Overlord Team Colleague

Try replacing $PHP_SELF with $_SERVER