PHP - Moved: General Question Only
This topic has been moved to Ajax Help.
http://www.phpfreaks.com/forums/index.php?topic=321915.0 Similar TutorialsHi, I am really plugging into how to write functions in PHP. But I was going to delve into a user management program and try to create it, but dont want to be the older version of what I was before if you like, where I just type in for the sake of typing in code so I thought I would question what their doing. But a peice of code, a very small snippet, this came up: @mysql_connect What does this actually mean with the @ sign infront of the mysql_connect function? Seen this a few times but just never appreciated what the at sign means, any help is wonderfully appreciated of course. Thanks, Jeremy I have a general questions. 1. I have a list of products. 2. I have a list of each of the 50 states. 3. I have a list of "professions". I need to setup something called "State Verbiage". However, this is going to be on a per product, per state, per profession level. So each profession is mapped up to each state and product. So product #1, in State #4, for profession #2 would have verbiage. Any combination of the three would have different verbiage. Any advice on the easiest way to set this up, would be appreciated. Sorry for the non code lingo, but I am wondering if I can pull a word from an array and use it to get a value from another array.
I am making a simple dodgeball game engine. I want the coaches strategy to pick a certain attribute to base who to throw to. Here is the team array:
//silverbacks Hi there just wanted to ask you a general question regarding referenced variables and functions in PHP. I have this code: function theRefFunction(&$var){ $var = $var +1; return $var; } $a = 50; echo $thisvalue = theRefFunction($a); Just for learning purposes, as allot of times beginning PHP seriously developers who want to improve on memory consumption in PHP find this tricky, is there any point in using an example like this? I.e. would I really need the &$var as the parameter for the function called 'theRefFunction()'? Just wondered thats all, if not what would be a better way for really using it? It's just so I can go onto maybe doing a loop in it and setting it as a real example like working out tax and stuff like that, just for learning purposes, won't yet be using it. Just wanted to build up as I said earlier a library of things I have done and make maybe my own tutorial site. I look forward to any replies, Jeremy. This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=326040.0 I'm ready for the next step on my site, which is learning how to filter results down with a second search. The scenario is: A viewer searches for a plant by 4 variables to describe the leaf. After submit, they go to the results page, with 200 paginated results. (This is where I've gotten to) Now, on that same page, they choose to further narrow their results by searching those 200 results for plants that have purple flowers. Maybe they get 40 results and can use another variable to narrow further - and so on. What's the best way to set this up? I've been looking into temporary tables, but it seems to be a challenge because the table deletes the moment they leave that page or close the connection? Sessions seem like another possibility, but I read there's security issues. What's the best way to set this up? Just re-query the database with the entire set of variables from both the first and second searches? is it quicker to build some type of permanent table with a timestamp that I can use to delete it after the user has gone away? Bear with me, as I'm still quite new at PHP. I'm trying to figure out the best way to build a search function for a database that will eventually be quite large. The path of the search I'm building is to go from a straight-forward javascript and html search page, to a paginated search result. Then the user can narrow down those query results based on a new search of their results. In trying to get the pagination to work across several pages(unsuccessfuly, I might add), I've been learning about sessions and temporary tables. But, because the database will be very large, I'm wondering if they are the wrong way. Sessions have a time limit, and temporary tables delete once the connection is closed. Is it possible/feasible to build a permanent table that puts in the search variables, with a unique id and use this to manage the searches, pagination and all that? Then, at some point in the process, I can put code to delete the corresponding row (or even make it a saveable search). Maybe somebody sees where I'm going with this and can describe it better than me? I'm just thinking off the cuff at the moment. Maybe there's some terminology that will help me find a tutorial. Any bit helps. thanks! Hi All: I have general question on php... if I have an "includes" folder, and on IE somebody goes directly to it, like: http://www.site.com/includes on IE, they can see the folder-tree- directory. So, files like config.php, or mysql.php could be visible. My question is, is this safe?? couldnt people then just drag-copy the file over into their system? or somehow open it, view its contents? I dragged-copied a .php file into my desktop, but nothing shows up when I open in in notepad. As opposed to opening another file that was also .php but which only had javascript code in it, and the javascipt did show up. So, I take it, it should be ok?? as it seems like it works as if the .php page actually had been loaded on a web-browser... doesnt show the php code... well, appreciate comments, feedback on this... what woudl be the best way to protect files like this? htaccess-protect? or is this not something to be overly concerned about?? From what I can tell looks like a lot of site are setup this way... so must be ok... ha? Thanks! This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=345714.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=342468.0 This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=307000.0 Amazingly, threads about application design belong in the Application Design sub-forum. This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=358384.0 This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=321972.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=305964.0 This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=357263.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=310658.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=342707.0 This topic has been moved to Application Frameworks. http://www.phpfreaks.com/forums/index.php?topic=357345.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=354997.0 This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=353404.0 |