Hi everyone,
When I'm testing locally, I have to add the name of the site folder as part of the path name when I'm including files, eg.
include $_SERVER['DOCUMENT_ROOT'] . '/site_name/includes/dbAdmin.inc.php';
Eventually when I upload the site to the hosting provider I'll need to remove the site name, ie.
include $_SERVER['DOCUMENT_ROOT'] . '/includes/dbAdmin.inc.php';
This is because the includes folder will be in the root directory.
This is going to be a real pain as I'd have to remove quite a lot of them, so I wondered if there was a way to avoid having to include the site name when testing or a workaround?
Appreciate any tips
problems with php variables in mysql query
i can't seem to get the following query to work. select $q1c from $vote_rate where id = $recent_record LIMIT 0,1 ;this method did not work eitherselect .$q1c. from .$vote_rare. where id =
upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please tell me how can i restrict that
str_replace help
I am thinking str_replace is my only option to filter outputs from my database to convert them to safe url variables.I am working with a database with over 4million records, and apparently when the
POST into Array problem
Hi Chaps,I have a repeat region, displaying rows of data: jobid, fromtable, translatorchargeIn each row there is an input field to enter a cost for each job 'charge'.//INPUT - TRANSLATOR CHARGECode:
Query failed issue with php script but works fine in mssql manager!
hi i have the script below which copies data from one table to another but will only insert new data update current data or delete old data from tempproducts to products then it will delete the
Hi, explode and strstr.
Hi, I seem to be confused about the strstr function, eg. i have a string like:"a.b.c.d.e.f""a.b.c.d.e"I always want it to split at the second "." from the end, so
keeps going back to index.html ???????
ok so i started making my site using mostly.html files now i have added a fair chunk of php. My index,html file had to be renamed to index.php because i am using a include function, I got told that if
Syntax error
hi im having a little trobble with this script --------------------------------------------------------------------------------------------error
pagination numbering pattern
Hello,I have following code which works great for pagination. but i have small issue now.Now the output is coming like this Quotemypage.php?page=2I want it like thisQuotemypage.php/2code-Code:
True way to see if action was successful?
If this is a good way to see if action was successful to continue:Code: function changeGameState($GameId) { mysql_query("UPDATE challenges SET status=status+1 WHERE id='$GameId'");