wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
Perhaps you might want to add the MYSQL_CLIENT_SSL Constant to the mysql_connect function eg: $conn = mysql_connect('localhost', 'user, 'pass', false, MYSQL_CLIENT_SSL) or die("Connection failed:<br />" . mysql_error());
-
Is that it? Theres nothing to critique. There is no layout what so ever. Just white text and black background. No offense but did you put any effort into this site?
-
If you want your scripts to still run when an error occurs the don't use die or exit. just echo the error message and the rest of the code in your script will continue to run.
-
You can put the sessions in the url but for every url on your site they will need to be like this: "echo '<a href="path/to/page.php?=PHPSESSID=' . session_id() . '">My link</a>'; Or just enable the session.trans_sid in the php.ini or in a .htaccess file and it'll do it automatically for you. But this can cause security issues with session hijacking.
-
So this a double post? In that case (looking at the topics you have made) I am looking this topic. If am wrong then PM me why I am and the reason for posting this topic.
-
The reason why FF is so popular is because of the many free extensions and themes FF has available which allow you to customise the way you want you to browse the net and use your browser. Not how someone else wants you to! IE doesn't have any themes and relatively low amount of extensions. Most extensions you have to pay for on IE.
-
Yes. When you use sessions_start it creates a cookie called PHPSESSID which stores the sessions id. This id is unique and is links to a file stored on the server which contains the sessions information. The file starts with sess_ and then has the session id directly after it. If the user doesnt have cookies enabled PHP wont be able to use the same sessions each time as the PHPSESSID cookie wont be set on the clients machine and thus they can't login to your site or whatever.
-
You don;t really need to use sessions_register() to register a session. $_SESSION['sessionName'] = 'someValue'; will do fine. session_register is depreciated and should only be used when register_globals is enabled. Also use use isset($_SESSION['username']) instead of $_SESSION['username'] != '' Ask your users to make sure they have cookies enable too as sessions rely on cookies.
-
$string = eregi_replace("\[", "<", $string); Outputs nothing
wildteen88 replied to masteroleary's topic in Regex Help
This line: '/(!|!){10,}/', Converts 10 or more explanation marks (!) into a single explanation mark. ! is the hex code for explanation mark. -
Or if you use Firefox get the ColorZilla extension. It will show you the color information to any colour you point to in the browser (note must click the colorZilla icon (lower left hand corner) in order to see the color information). ColorZilla also has other features too.
-
Help with using a .htaccess file, local php.ini, or other
wildteen88 replied to roseuz's topic in PHP Coding Help
if all you want to do is turn off register globals then all you need to do is add the following to the .htaccess file: php_flag register_globals Off You do not need to alter any other PHP setting. When creating the .htaccess file it should be named just .htaccess (not filename.htaccess). This file should be placed in your document root of the server (the folder where you upload all your website files to). Also in order for the server to acknowledge the php_value/php_flag directives in the .htaccess file the AllowOverride directive must be set to either FileInfo or All in the httpd.conf. Also PHP must be loaded as an Apache module too. If its loaded as CGI then you wont be able to use the php_value/php_flag directives in the .htaccess file and you'll most likely get an Internal Server Error message too. You cannot create you're own custom php.ini either this down to the webhosts discretion. -
To stop SQL injection use the mysql_real_escape_string function on any data that goes into a query.
-
Huh! the code tags already exits. As far as I know you cannot create your own custom html tags with CSS. Doing a smilies parser is pretty easy to do in PHP. Look into the str_replace function.
-
LIke this? if(($query >= 1 && $query <= 100) && ($query2 >= 45 && $query2 <= 85)) { // query is between 1 and 100 // and // query 2 is between 45 and 85 } else { // query is not between 1 and 100 // and // query 2 is not between 45 and 85 }
-
Did you add PHP as an Apache module? If yoiu didnt then APache is not configured correctly. Add this line to httpd.conf: [code]LoadModule php5_module "C:/php/php5apache2.dll"[/code] NOTE:change C:/php to the correct path to where PHP is installed. Also change php5apache2.dll to php5pache2_2.dll if you have installed Apache2.2.x after: [code]#LoadModule ssl_module modules/mod_ssl.so[/code] Save the httpd.conf and restart Apache server.
-
It is a permissions issue with the php file you are requesting. Make sure the permissions for the file is set correctly chmod permission 0644 should be fine (i think). Also make sure the php file is owned by you too. (the user you use to login to ubuntu).
-
Whoa! Why have you bumped a topic that was posted 6 months or so a go Topic closed.
-
[SOLVED] if (isset($section) && $section != "")
wildteen88 replied to fbrown's topic in PHP Coding Help
By looking at the script those variables are coming from the URL. Change $section, $section2 and $page to $_GET['section'], $_GET['section2'] and $_GET['page'] respectively. The script was most probably coded with register_globals enabled. -
[SOLVED] if (isset($section) && $section != "")
wildteen88 replied to fbrown's topic in PHP Coding Help
Is this a script you have made or a script you have download? Post the whole code here. I'm still not understanding you sorry. -
It is possible yes. Provide the domain or IP address to the remote server with the database on for the hostname. Example: $conn = mysql_conncect("www.2.com", "username", "password");
-
What do you mean universal PHP test file? Are you going to http://localhost to run the php file? If you are and are just getting source code then Apache isn't configured correctly. How have you configured Apache?
-
If you are on Windows look for the Apache taskbar icon (lower right hand corner of screen). The icon has a green triangle inside a white circle which a pink/purple feather sticking out of it. Left click the icon select Apache2 from the list and select restart. Or you can go the long route and go to Start > All Programs > Apache HTTP Server 2.x..x > Control Apache Server > Restart If you are on *unix then you need to do it via command prompt. Look at the Apache documentation for the correct command for restart Apache server on *nix based systems. http://httpd.apache.org for documentation
-
[SOLVED] if (isset($section) && $section != "")
wildteen88 replied to fbrown's topic in PHP Coding Help
huh! Can you please explain with more detail with what you are trying to do. Your question is very vague. -
the variable $this is used to access objects (variables) and methods (functions) within a class.
-
To backup a database look for an export link whilst viewing the database in phpmyadmin. Then to restore the backup look for an import link. There should still be the same functionality of a regular version of phpmyadmin to that of 1&1's.