Forum: PHP Dec 10th, 2004 |
| Replies: 12 Views: 43,456 What exactly are you trying to do? Surely this is a problem for the client interface, not the server? |
Forum: PHP Nov 20th, 2004 |
| Replies: 1 Views: 2,427 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... |
Forum: PHP Nov 19th, 2004 |
| Replies: 1 Views: 2,645 Half the commands are commented... |
Forum: PHP Nov 14th, 2004 |
| Replies: 4 Views: 14,315 Ah, calm down. The problem is that $HTTP_ x _VARS isn't enabled in PHP5. Ya need to change your php.ini file settings. |
Forum: PHP Nov 7th, 2004 |
| Replies: 6 Views: 2,724 PHP is a dynamic programming language. It, for example, generated the page that your are viewing now. |
Forum: PHP Nov 4th, 2004 |
| Replies: 3 Views: 11,009 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... |
Forum: PHP Oct 30th, 2004 |
| Replies: 7 Views: 4,567 WHy do you need the number of rows? |
Forum: PHP Oct 25th, 2004 |
| Replies: 3 Views: 13,723 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 |
Forum: PHP Oct 25th, 2004 |
| Replies: 2 Views: 3,348 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/'... |
Forum: PHP Oct 21st, 2004 |
| Replies: 7 Views: 4,195 Actually it will. It's a valid result handle, irrelevant of its contents. |
Forum: PHP Oct 20th, 2004 |
| Replies: 7 Views: 4,195 Are you syre that the query is returning a result? |
Forum: PHP Oct 20th, 2004 |
| Replies: 7 Views: 6,920 Ah, I wasn't aware of this... |
Forum: PHP Oct 20th, 2004 |
| Replies: 7 Views: 4,195 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)){
... |
Forum: PHP Oct 19th, 2004 |
| Replies: 6 Views: 3,881 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['page'] will NOT be the same as $page. $_GET is... |
Forum: PHP Oct 19th, 2004 |
| Replies: 7 Views: 6,920 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,... |
Forum: PHP Oct 19th, 2004 |
| Replies: 19 Views: 7,185 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... |
Forum: PHP Oct 18th, 2004 |
| Replies: 6 Views: 3,881 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... |
Forum: PHP Oct 18th, 2004 |
| Replies: 7 Views: 6,920 Why bother enquoting $context in the include statement? Just slows down the parser... |
Forum: PHP Oct 13th, 2004 |
| Replies: 2 Views: 9,388 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. |
Forum: PHP Oct 10th, 2004 |
| Replies: 3 Views: 34,679 The website that told you to use $PHP_SELF is severely out of date. Instead, use $_SERVER['PHP_SELF'] |
Forum: PHP Oct 10th, 2004 |
| Replies: 4 Views: 14,110 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... |
Forum: PHP Oct 10th, 2004 |
| Replies: 19 Views: 7,185 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!';
?> |
Forum: PHP Oct 9th, 2004 |
| Replies: 19 Views: 7,185 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... |
Forum: PHP Sep 24th, 2004 |
| Replies: 2 Views: 51,367 Or, if you (very wisely) do not have auto_globals enabled, then $_SERVER['PHP_SELF']. |
Forum: PHP Aug 9th, 2004 |
| Replies: 9 Views: 4,249 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... |
Forum: PHP Aug 3rd, 2004 |
| Replies: 3 Views: 5,216 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 |
Forum: PHP Aug 3rd, 2004 |
| Replies: 1 Views: 3,568 For security reasons, you should use $_GET['II']. $_GET is for URL variables. If it's form data, you'd need to use $_POST['form_var_name_here'], and for Cookies, $_COOKIE['cookie_var_name_here'].... |
Forum: PHP Jun 24th, 2004 |
| Replies: 1 Views: 2,604 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... |
Forum: PHP Jun 14th, 2004 |
| Replies: 2 Views: 4,357 Try replacing $PHP_AUTH_USER and $PHP_AUTH_PW with $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] respectively. |
Forum: PHP Jun 13th, 2004 |
| Replies: 43 Views: 174,536 That's usually best. Saves a lot of hassle. |
Forum: PHP Jun 6th, 2004 |
| Replies: 23 Views: 19,394 Try replacing $PHP_SELF with $_SERVER['php_self'] |
Forum: PHP Jun 4th, 2004 |
| Replies: 6 Views: 3,356 Oh you could use preg_replace() with some regular expression trickery...
www.php.net/preg-replace
www.regular-expressions.info |
Forum: PHP Jun 1st, 2004 |
| Replies: 6 Views: 3,356 |
Forum: PHP May 16th, 2004 |
| Replies: 29 Views: 63,049 www.php.net
Go to downloads... downlaod what you need... absolutely free and open source.
PHP is compiled at run time. The Zend Optimiser merely cleans up the code to make it compile faster...... |
Forum: PHP Apr 30th, 2004 |
| Replies: 2 Views: 3,933 Could we see the code for this report? |
Forum: PHP Apr 28th, 2004 |
| Replies: 1 Views: 5,270 You've missed out a dot between the "surname" and the $surname.
But... why not just have "Surname: $surname Firstname: $first_name" etc rather than bothering with the dots... otherwise you're... |
Forum: PHP Apr 21st, 2004 |
| Replies: 2 Views: 2,895 Due to a restriction in the HTTP Protocol, YOU HAVE TO SEND COOKIES AND OTHER HEADER DATA BEFORE ANY OUTPUT. The best way I can think of doing that without to many drastic changes would be to move... |
Forum: PHP Apr 21st, 2004 |
| Replies: 5 Views: 3,961 Books can only take you so far, and they're often quite outdated - though I'm surprised that it's assuming request (sent in forms, urls, cookies) variables have been assigned to normal variables... |
Forum: PHP Apr 21st, 2004 |
| Replies: 5 Views: 3,961 ok, have you covered arrays? I will assume you have for the moment. Otherwise, the following will only confuse you. :p
AFAIK, as is only used in a foreach() statement.
Let's say that you have... |
Forum: PHP Apr 20th, 2004 |
| Replies: 5 Views: 3,961 Well it's no doubt because the server administrator is sane.
Try changing $username to $_POST['username']. By default PHP won't assign external variables passed through forms, cookies, and URLs... |