come to think of it $GLOBALS will not be storing the values once the pages when another page is loaded. What you want is
nickmaroulis
Posts
-
How to know if a variable has been initiated or not [modified] -
How to know if a variable has been initiated or not [modified]If the variable is already declared it will stay global. Undefined index means that element of the array globals is not set. The most useful function in php is var_dump()! It usually tells you what you need to know. I would var_dump( $GLOBALS ) and see what you get. feel free to contact me directly if you are still having dramas.
-
Problem with pointers / permissions?if it is in the root of the site try "{$_SERVER['DOCUMENT_ROOT]}/paul_menubar_test/menubar_test_filesavail.php";
-
How to know if a variable has been initiated or not [modified]Where is the $MyLangVar declared? if it is inside the if statement it could be lost after the if statement is completed.
-
Accessing local machine from web pageLike a virus or tracker. Can I have the link please!!
-
PHP applications on windows and linuxIn my experience when I had to host on a windows box because of the database we were using, I found IIS6 a nightmare!! The connection would fail, Permissions would change on upload and the whole set up was a nightmare. It took over a day just to get the site live and although there were some good forums on how to get php going on IIS, the reliability left something to be desired. IIS 7 may be better but IIS work well with php. I would definitely run on XAMPP for a simple setup or install apache by itself. It was simple to install and I never had a server outage or drama in over 18 months. For consistency between the platforms IIS is the way to go. The other thing to note is that some php modules that are easy to get going on debian like and cent os systems can be more tricky to get going on windows. A commonly used php module is imagemagick. File paths with windows can sometimes be a pain too.
-
How to get PHP to rename fileswhy dont you create a database entry for each file then use the primary key of the database item to rename the file. //get uploaded file //create database entry //name //type ... what ever fields are relevent //get last insert id returns last primary key inserted // rename file to $last_insert_id.xyz rename( old file, last insert id ) th
-
Passing variables to form in iframeProbably using a session would be the best way to do it
-
"." operator to join two strings...PHP has two ways for specifying strings. single quotes '' double quotes "" $car = 'Holden'; $sq = 'My car is a $car'; //My car is a $car $dq = "My car is a $car"; //My car is a Holden With double quotes the variable is inserted. If you are using an array or want to seperate a variable in double quotes use braces. $array['tv_show'] = 'American Idol'; $br = "{$array['tv_show']} is terrible but {$car}'s are awesome"; for the example above use "{$_SERVER['DOCUMENT_ROOT']}/FILE.php"; It may be that you are using windows and the interpreter could be swapping a '/' for '\'.
-
Problem with PHP - FastCGI - Headerstheres some good stuff http://php.net/manual/en/function.header.php about Chrome requiring a status header before changing headers.
-
Problem with PHP - FastCGI - HeadersI have the same problem with no error output and I just receive a white screen. I have to check the apache error log. On my system the path is /var/log/apache2/error.log
-
JSON response from PHP for ajaxwhat is the response? what does firebug say?
-
ie 6/7 div seems to be clearingThankyou for the help guys It seems the most difficult part of building a website is getting pages lining up on multiple browsers.
-
ie 6/7 div seems to be clearinghere is my code <div id="main_body_holder"> <div id="main_body_left"> <div class="search_pages"> Pages: <strong>1</strong> <div class="u_right"> <a href="/link">My Things</a> <strong>My Stuff</strong> </div> </div> css #u_right{ float right; } instead of getting Pages: 1 My Things My Stuff I am getting Pages: 1 My Things My Stuff If anyone knows a decent fix for this?
-
How to check whether a database/table exists using php and how prevent sending a form 2 a php file if there r fields not filled by the user???dont use javascript to validate!! make sure you validate on the server else the validation can be bypassed ie let them submit the form and then validate it. If it is your webserver wouldnt you know if the table and database exist? It is all explained on php.net in great detail
-
How to name a URLif you are using apache look up mod rewrite redirect all requests to a base page and build your pages from there abc.com/car/toyota/2 you would split the string type = car make = toyota page = 2 and use those values to build your page ***************************************************** if you are using static html pages you can do it crudely you could use a folder for each page and put an index.html inside it eg the file cars.html could be stored as /cars/index.html when abc.com/cars is requseted it will show /cars/index.html with a clean URL
-
PHP Exams -
PHPphpmailer for sending horde will do the trick for a php mail client but you need pear running
-
Attendance tracking from card Reader in PHPTheres no way you would want to use PHP for that!! What is the card reader?? what are the device settings and specifications?? what driver is used? you will probably have to build something from scratch and given the moronic question, I would suggest you are well out of your depth.
-
How Disable Right Click on Webpage ??Yeah it was