How To Disable Controle Keys
In my application I want to disable my controle keys to
save copying and taking screen shots of the my page.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Using Array_intersect() Without Keeyping Keys From The Array1, I.e. Re-number Intersect Array Keys.
I only use indexed arrays. When I use array_intersect function, of $a3 = array_intersect( $a1, $a2 ), I just need the vales of intersect array and let keys to be re-numberred from 0.; I found the intersect array $a3 have the correct values but keep the keys of $a1. When I use for loop from $index=0 to sizeof ($a3)-1, by $a3[$index], php reports "undefined offset " problem. How can I re-number the keys of $a3 from 0 to sizeof($a3)-1;
Disable Cookie
I am using cookie to hide a variabe in send.php3 as following:send.php3: PHP Code:
Disable Checkbox
I have a checkbox that I set by php code to be either "checked" or "". I want to disable the ability of the user to check or uncheck it. I tried "readonly", but that didn't work.
Can I Disable $PHP_AUTH_PW?
Is there any way I can disable the setting of the environment variable $PHP_AUTH_PW? I'm authenticating via LDAP, and don't need (or want) the password available to PHP. I also don't need $PHP_AUTH_USER; the current authenicated user is available in $LDAP_USER.
Disable (grey Out) A Button.
Experienced programmer but new to PHP. Moreover I'm to use PHP with Xoops on top (this adds object orientation?). I don't seem to find a xoops Usenet group? Whatever the case (and presumably a Xoops property): how does one disable (grey-out) a button?
Disable Right Click In Opera
In my website there is requirement to disable rightclick. I am providing the code and it is working in I.E ,Netscape and Mozilla.But not working in Opera browser. My code is <body oncontextmenu='return false;'> The above single line code is working very fine in the above browsers not in Opera.
Disable Phpinfo In Php3
In PHP4 there is the posibility to disable the use of phpinfo() by putting "disable_functions = phpinfo" in the php.ini-file. Is this also possible with PHP3 (in php3.ini) or is there another way of disabling this function?
How To Disable PHPSESSID From Posting In URL
I don't want the URL to display this info. I never notcied this being displayed before but all of a sudden it seemed to pop-up. I don't host my own server so any access to the php.ini file is not possible. Any ideas out there?
How To Completely Disable Openbase_dir?
I'm using php 4.3.4 and have an intermitent problem with gallery (gallery.sourceforge.net) regarding the open_basedir restriction in php. The error I am getting is: ------ PHP Warning: (null)(): Failed opening '/home/httpd/vhosts/mydom.com/httpdocs/gallery2/main.php' for inclusion (include_path='.:/usr/share/pear') in Unknown on line 0, referer: http://mydom.com/gallery2/main.php ------ I have disabled safemode and open_basedir in php.ini and have verified through a phpinfo() call that they are disabled. Actually, open_basedir is reported as being set to "no value" and safemode is reported as disabled. The strange thing is that this does not happen every time i access this page. It is only 1 out of 10 times and usually it is the first time i access the page for the day(but not always). I have restarted httpd and the server just in case. I also checked .htaccess but it shouldnt matter since phpinfo() says it is not set. This is baffling to me! If I could rip this feature out I would. It was installed by default on my dedicated server.
How Do You Disable The Close (x) On A Window
I'm running a PHP script on page1.php that takes a few seconds, once it has run the page then redirects to page2.php automatically sending variables . However, if the user shuts page1.php by pressing the X on the top right of the screen, the redirect doesn't happen!! Does anyone know how to disable the X and stop the page being closed down please?? or another solution??
How Do I Unclock The URL/disable Frameset?
I have a few websites out there and set up alittle script for my friends to auto register subdomains for their affiliate sites. Problem is, some affiliate programs don't allow URL MASKING and I can not figure out HOW to disable it within the script. Could someone take a look at this and help me? I'm trying to disable the frames in forward.php, along with whatever it gets linked to (i'm very new to this, so i included a link to whole script incase there is more then just forward.php I need to edit). Code:
Disable The Values In Address Bar??
Am trying with a social network site... i want to disable the values in address bar which are passing as string variables, My pages are included in the index page.. and my values are passing like that... by changing the values in address bar my page is changing.. How can i solve this issue... i think anyone can change my site using this address bar.. how could i prevent this???
Disable Right-click On Mouse
Is there a php script that wil disable the right-click on mouse or maybe disable the copy and paste feature of the browser? because i have a client, wherein he wants to prevent public viewing his website from copying his website content?
Disable Command Line Arguments For Php-cli
i have been trying to disable the -n and -c arguments that you can use with php from the command prompt. this is because these features can effectively disable my php.ini which has a whole mess of disabled_functions (that i want to ensure remain disabled). my best idea for going about doing this so far has been to download the source for the newest php, with hopes to compile my own which will ignore arguments other than a filename. so far the closest i have got is to the the zend_API.c which has the follow function: Code:
Disable .php Handler For A Specific Browser,
I would like to know if there is a way to remove/disable .php handler when the request come from a specific Browser. I ask this because I use dreamweaver / webdav to edit my .php files. But when I try to open the .php file in dreamweaver, what I see if the result of the .php executions, not the .php source files. I know that you can create an Alias location "/dav", and disable the ..php handler for this location. It's a solution, but not the best I think. It would be better if we can disable .php runtime where dreamweaver Get the files.
Disable Magic_quotes_gpc In A .htaccess File
How do I disable magic quotes via .htaccess? I put the following file in my webroot, but it does not disable magic_quotes_gpc (according to phpinfo(), both the local and master value are still "on") <IfModule mod_php4.c> php_value upload_max_filesize 8M php_value magic_quotes_gpc 0 </IfModule> The change to upload_max_filesize works (master is 2M, local value is 8M, according to phpinfo())
Disable Backbutton - When Page Has Expired...
I have this on the page: <?php header("Pragma: no-cache"); header("Expires: -1"); ?> but I want it so, that when the user goes back, (s)he might not be allowed too - say the session has expired. How can i achive that?
Disable Coding In Textboxes/Textfields
Is there a way to disable PHP, HTML, and the sort in textboxes and input fields? There are things called SQL Injections which are usually used in an url or input field to steal data from the database.
Why Does PHP As Apache Module Disable PHP's Java()?
My site was suddenly running HTTP authentication and was faster. But if this was a problem from the past, now a entire part of my site does't work because my calls i had to function Java() now generate this output: Fatal error: Call to a member function on a non-object HTTP authentication(PHP as Apache module) versus Java Virtual Machine what's the relation between them, how can i restore Java() to work properly. Is it on httpd.conf? why does not PHP call Java extension if it is installed on Apache as a module?
Disable Safe Mode Without Loss Of Security ?
I'm trying to disable safe mode from my php installation. First because this functionality will be removed in PHP6, and because it's very restrictive and it's giving me headaches when configuring frameworks and other applications. Moreover, it's said on the php website that the safe mode solution is not a good thing... I'm looking for a tutorial which indicates what to configure on a server in order to have a secured installation of PHP, but without safe mode. I can't find it...
Enable/disable Html In Form Processing
I've got a form, where it submits some info and adds it to a txt file. The file is then displayed on the front page of my site; however, there is a security problem i'd like to fix dealing with html. How would you go about disabling the use of html in a form?
PHP Script To Disable/enable Internet Access
We are finally getting DSL again... but our PC is in the living room... and the youngest has figured out that if he hits the right keys... he can bring up Internet Explorer. All is fine and dandy right now, but come next week... that things wont be so dandy. I am setting our LInux router/server back up soon, and would like a quick, easy way to enable and disable our internet access. What I would like to do is have a simple PHP page that says (iff network status = inactive) Your Internet Access is DISABLED Enter passcode to enable internet access [TEXTBOX] Then [OK] so on clicking "OK" if password = suchandsuch then run script" "/sbin/network start" or whatever the script is and refresh the page then iff network = active Your Internet Access is ENABLED [DISABLE] upon clicking of "DISABLE" run script /sbin/network stop and refresh the page Something to that effect.
Disable Passing Arrays In Query String?
Is there any way to stop PHP from turning a query string like this: ?var[] into an array when it is read by $_GET['var']? I have quite a few input validations that are easily screwed up by this strange (and apparently undocumented???) feature...
Disable Submit Button If Text Field Is Empty
I am unsure if this must be done with Ajax, or if it can be done with PHP. I have a simple search page where I want the submit button to be disabled if there is nothing entered in the text field, and once something IS entered, then the search button is enabled. I was thinking Ajax, because I am looking for it to be real time and I am not sure if its possible with PHP as I am just a novice when it comes to certain things. So the button is always disabled when there is nothing, and enabled when the user enters something. And lets say the user enters something and removes it, then the button disables again? Is this possible to do with PHP and if so, could someone please help me tackle this . Code:
Using Max() On Array Keys
i am using an array to store contact data within a session. it looks like this: $_SESSION['contact'][$key][<content>] $key counts the set of records, so i have $_SESSION['contact'][Ɔ'] $_SESSION['contact'][Ƈ'] $_SESSION['contact'][ƈ'] and so forth. [<content>] stands for the fields containing the actual set of data, which are stored within the [$key]-arrays. at one point i need to find out what the highest value of $key is. running max($_SESSION['contact']) simply leaves me with "Array()" as the result. what i am doing wrong, and how do i correct it?
Array Keys
is it possible to use only a key in an array meaning: $arr["a"]="yo"; $arr["bc"]="ygo"; $arr["eea"]="wgyo"; $arr["fa"]; $arr["a"]="yo"; and then somehow get all the keys without and value i tried: while (list ($key) = each ($arr)) {print $key;} but i doens't seem to work.
Primary Keys
How is it that even though I have the column "username" in my database set as a Primary key, using my PHP script to add new users to the database works without any errors even when signing up using an existing username. I have a database full of the same usernames!
Array Keys
If I used a "for each" to go through an array or irregularly numbed keys, is there a way to get the key number that the loop is currently on each time?
Shortcut Keys
I would be liek to be able to set up a webpage with shortcut keys so that when certain buttons are presses, a pop up window will open with a designated further page displayed. Specifically I would like the shortcut keys to be a couple of the function keys, ie f10, f11 and f12.
Array Keys
Been trying to figure out an array issue. For some reason when I echo $key it's echoing "Array". I want it to return the key (in this case adventure). Code:
Mail() Function Blocks Webpage For Nameserver Lookup ! How Can I Disable It?
When mail() function reaches a wrong email address or a down domain name (which it can not resolve it to its IP address) it blocks PHP page for a while. How can I disable this behaviour? I was able to disable this in mail clients such as Pine by setting an option that tells "Do not make DNS lookups before ading mail to queue" . Is there anything in PHP for doing this?
PHP & MySQ + Unique Keys
I'm trying to write a system thats used for about 50 clients that uses html forms and php to log details. The problem is that when a client loads the form page it's given a value which is the last record in a table +1 (i.e. so its the next record). The problem with that is that a client could sit on that page for 20 mins (or whatever length of time) and a different client could use that record number and there what be an error "duplicate key....". I could use an MySQL UPDATE to lock the record when its issued to each client and maybe use a timestamp and check if the timestamp is over 10 mins and delete any records that are over 10mins but there is the possibility of redundant data (or really useless data, a unique record and a timestamp) in the table sitting there for 10mins at a time. Is there an easy way of 'gauranteeing' a client a unique key? So you don't have to lock the record when the page loads (this also means that when you refresh the page that the unique key is incremented as you locked the last record and didn't put anything into the table, so the refreshed page is issued the next key +1 again).
Associative Arrays Keys
I have a some text that i have to sort according to their year. The text is in this format.. A Short Story (2000) A long time ago (1999) A list (2004) Before Time (1999) Car parts (2004) so basically i want the output to be.. A long time ago (1999) Before Time (1999) A Short Story (2000) A list (2004) Car parts (2004) I thought the way to go about this would be to extract the years and put the whole thing in an associative array with the years as keys, but of course the keys have to be unique so in this case values override each other. PHP Code:
Automatic Array Keys
My array keys are behaving strangely. In the manual it says calling an array like $array[] = "something" should make the value be put into the next available integer key available. However, my values are being placed with whole sets of blank keys inbetween. Here's what part of the print_r() of the array returns: Code:
Getting MySQL Generated Keys
I am a Java/JSP developer by trade but am currently developing a MySQL/PHP solution. In JSP when I run an INSERT statement on the db I am able to automatically get back a list of any generated keys (without having to do some sort of subsequent query to get the information). Is there a PHP equivilent of this?
ActiveRecord And Foreign Keys
I am having trouble wrapping my mind around the ActiveRecord pattern and foreign keys. I understand that for each table, there should be a class, and each row is is effectively an instance. But, my problem arises when I look at foreign keys and advanced relationships. For basic foreign keys, I can just automatically reference to the object. Example: Table: invoice id, notes Table: items id, cost, invoice_id When working with an instance with items, I can easily load a new object called "invoice." But, what if I am already working with invoice, and I want to load items? I can't think of any way to abstractly relate the two. Also, what if I want to two things that are both a "has many" relationship? For example, if I take users that can have multiple qualities, I would need three tables: one for users, one for the qualities, and one to link. Table: users id, username Table: link id, user_id, quality_id table: qualities id, quality_name
PHP MYSQL And Primary Keys
Say I have an ID field in my database that is a primary key and an UNSIGNED AUTO INCREMENTING TINYINT. It stores range of 0-255. Ok I add a few items to the database, say 240. At a later date I delete a few records, say rows 33, 44, 55, 66, 77, and 240. So the last record in the database now has an ID of 239, I add another record and it gets assigned an ID of 241?. I then add a few more and it finally reaches ID 255. Now all the ones I deleted previously do not exist. So I try to add another record, will it just get added and assigned the ID of a record that doesent exist such as 33, 44, 55, 66, 77 or 240? If not is there a way around this? I am pretty new to MySQL and I dont know the answer to this but I know that it could prove to be pretty inefficient if an ID field can hold 255 records but only holds 240. Do you understand what I mean and can anyone answer my question?
Foreach Is Returning Value Of First Key For All Keys
I'm having trouble with the foreach function. I'm using it twice inside a user defined function with two different arrays, and in the second instance it's returning the value of the first key for all the keys. My code is shown below and the problem areas are marked with comments. In case you're wondering, this script is for generating sticky checkboxes that include an event handler. <form> <?php if (! is_array($like)) { $like = array(); } function make_checkbox_click ($name, $query, $options, $onClick) { foreach ($options as $value => $label) { printf('<label><input type="checkbox" name="%s[]" value="%s" ', $name, $value); # This is the instance of foreach that's not working correctly. # It's returning the value of the first key for all the keys. foreach ($onClick as $key => $event) { printf ('onClick="%s" ', $event); } if (in_array($value, $query)) { echo "checked "; } echo "/> $label</label><br /> "; } } # End of user defined function. $characteristics = array( 'personality' => ' I love their personalities.', 'minds' => ' I admire their minds.', ); # This is the array that foreach isn't working correctly with. $charClick = array ( 'personality' => "alert('Aren't they the greatest?');", 'minds' => "alert('They're smarter than most people their age.');", ); make_checkbox_click (posPoints, $posPoints, $characteristics, $charClick); ?> </form>
Print Out Array Keys Only
Hi, there are lots of examples that show you how to print array values given a key. Do you know how to print keys for a given array. example $myArray = array('a'=>1, 'b'=>2, 'c'=>3, 'd'=>4); How do you print 'a', 'b', 'c','d' only without using any loops?
Mysql: Get Foreign Keys
there is a function to get the foreign keys of a table? i have this function to get all table infos: $fields = mysql_list_fields($V['db']['name'],$table) or die (mysql_error()); $columnsCount= mysql_num_fields($fields) or die (mysql_error()); for ($i = 0; $i < $columnsCount; $i++) { $columns[$i]['name']=mysql_field_name($fields, $i) ; $columns[$i]['length']=mysql_field_len($fields, $i) ; $columns[$i]['type']=mysql_field_type($fields, $i) ; $columns[$i]['flags']=mysql_field_flags($fields, $i); } but i need alo to know info about foreign keys.
Printing Out Array Keys
i'm trying to find a simple way of printing out the keys in an array generated by mysql_fetch_array which returns a single row. i.e. while ($row=mysql_fetch_array($result) ) { print out the $row keys and values } is this possible?
Write Array Keys To SQL
I have an array of data. I want to write each key in the array to its own row in SQL. what would be the best way to accomplish this?
Associative Arrays: Are Keys Strings?
I am wondering if it is 'wrong' (although it works) to work with associative arrays like this: $array[somekey] = blah instead of specifying the key as a string: $array["somekey"] = blah What would you say? What is right, what is wrong from the point of view of correct PHP coding?
Foreach Loop With Array Keys
I am unable to get the following piece of code to work as desired. The fields valuable seems to contain all values however the vaules variable only contains the first assignied with $values = ''' . $arry[$keys[0]] . ''' $keys = array_keys($arry); $fields = '`' . $keys[0] . '`' $values = ''' . $arry[$keys[0]] . ''' foreach($keys as $key) { if($key != $keys[0]) { $fields .= ', `' . $key . '`' $vaules .= ', '' . $arry[$key] . ''' } }
Prepend Array Keys With A String
I have looked on uk.php.net for the function I need but can't find it. Does anyone know what the function is called who's purpose is: to recurse through an array and assign values to keys whilst prepending the key name with a string specified by one of the function parameters?
|