wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
You'll want to create two tables, one is gangs and the second gang_members. In gangs you store all the available gangs. You then then link the members that belong to a specific gang by storing the gang_id for gang the member belongs to in the gang_members table. +--------------+ | gang table | +-----------+ +--------------+ | Members | | id -------------+ +-----------+ | name | | | id | +--------------+ | | username | +------ gang_id | +-----------+
-
Most upload speeds are usually a 10th of total download speed, some maybe more. It depends on the ISP and how they serve the download/upload ratio. For example say a user has 1Mb broadband connection. Note Mb stands for megabit not megabyte, a megabit is 1024 bits. This will allow the user to download at around 120KB (kilobytes) per second maximum (Kb / 8 = Kilobytes). Now take a 10th of their download speed and you'll get their maximum upload speed, which will be around 12KB per second. You can then use this max upload speed as a guide. To do this you'll convert the file size of the uploaded file in to Kilobytes and divide the filesize by their upload speed, eg 3072KB divide by 12Kb = 256 seconds (or ~4.5 minutes).
-
number_format will only place the decimal point in the specified place if you pass it a float: $num = '123.456'; echo number_format($num, 2); // result: 123.46 If you pass it a whole number (integer) then it'll add .00 to the end of the number. If you want to always place the decimal before the last two digits of a number you'll have to do it manully: <?php $num = '10000'; // get last two digits of number $l2d = substr($num, -2, 2); // place decimal before the last two digits of the number $new_num = substr_replace($num, '.', -2, 2) . $l2d; echo $num . '<br />' . $new_num; ?>
-
You could also use strtotime too: strtotime("-5minutes");
-
[SOLVED] loadmodule will not load to server
wildteen88 replied to syngod's topic in PHP Installation and Configuration
You should use php5apache2_2.dll for using PHP with Apache2.2.x, LoadModule php5_module "C:/php/php5apache2_2.dll" php5apache2.dll is for Apache2.0.x php5apache.dll is for Apache1.3.x Also do not move any files outside of the php installation folder. When you move files outside of the folder it can cause problems with configuration and later on when you go to upgrade PHP. You are better of adding C:/php to the Windows PATH (read this PHP FAQ). That way PHP can access itself and you do not need to move files around the file system. The following few lines is what is needed to setup PHP with Apache: LoadModule php5_module "C:/php/php5apache2_2.dll" PHPIniDir "C:/php" AddType application/x-httpd-php .php Also note that whenever you make any changes to the http.conf that you must restart Apache in order for the changes to come into affect. This also applies to the php.ini too. -
[SOLVED] checking to see if select returns nothing
wildteen88 replied to envexlabs's topic in MySQL Help
You'd use the PHP function called mysql_num_rows, this function will return how many results have been returned from the query, eg: $sql = 'SELECT * FROM `table` WHERE `ID` = 5'; $result = mysql_query($sql); // check to see if the returned rows is greater than zero if(mysql_num_rows($result) > 0) { // result has been returned // process the results } else { // no results was returned, we'll display a message echo 'No results returned'; } -
if you want the text to be one color and the underline to be another you'll want to apply a bottom border, eg: u { color: #333; /* apply text color */ text-decoration: none; /* remove the underline */ border-bottom: 1px solid #F00; /* apply a bottom border, to act as the underline. */ } That will give all text defined within <u></u> tags a light grey/black color and a red underline.
-
give your input field a class, eg class="mytextfield": <input type="text" name="textfield" class="mytextfield"> Then in your stylesheet/embed css. You'll use the following css: .mytextfield { background-image: url(path/to/bg/image); } That'll apply a background image to your text field. You could also do: input.mytextfield { background-image: url(path/to/bg/image); } That will do the same, however it'll tell the browser to only apply the background to input tags that have a class name of mytextfield.
-
PHP installation help
wildteen88 replied to barefootsanders's topic in PHP Installation and Configuration
Check Apaches error log. Apache should of logged an error for why it cant start up. -
Files ending in .php are not handled by php
wildteen88 replied to simsblackcat's topic in PHP Installation and Configuration
Have you configured Apache to handle .php files with the PHP interpreter? If you have post how you have Apache configured currently and the version of Apache, PHP and MySQL you have installed. -
[SOLVED] loadmodule will not load to server
wildteen88 replied to syngod's topic in PHP Installation and Configuration
Can you post the version numbers for Apache, PHP and MySQL you have installed. Also can you post how have tried to configure Apache with PHP too. -
how i can add javascript library
wildteen88 replied to marhoons's topic in Editor Help (PhpStorm, VS Code, etc)
Note sure but there might be an extension available for Dreamweaver for javascript code hints in the Adobe exchange. Note, not all extensions from the exchange are free, some require payment to the author. Also it might be worth while for you too look at the Aptana IDE -
Apache's configuration for those three lines is fine. It should work. Just make sure you are restarting Apache whenever you make any changes to either the httpd.conf or the php.ini. Otherwise your new configuration wont take affect until you restart Apache. Apache loads configuration files only when the server gets started or restart, all configuration gets loaded into memory. It doesn't reload the configurations on every file request. Also this line: LoadModule php5_module c:/php/php5apache2.dll mainly the php5apache2.dll part. Is only compatible with Apache2.0.x and not Apache2.2.x. For Apache2.2.x you must use php5apache2_2.dll instead - this file comes with latest version of PHP5 (php5.2.x)
-
[SOLVED] Polling php install question
wildteen88 replied to mbdonner's topic in PHP Installation and Configuration
The syntax of that file is fine. Whats wrong now? -
Look in Apaches error log. The error will be logged in there.
-
This is what I mean by fux columns. Its is not a large image. Alternatively doing a quick google search I found this site. Choose a site layout from there and see how it looks in different browsers. The one you like most apply your design to it.
-
You could use faux-columns. Basically you'll create an image (1px high by however wide your site is) of what your columns looks like. You'll apply the image as a background for the container div and repeat it vertically (repeat-y). That way you'll get the effect the columns are equal heights even though they're not. This technique should be cross browser compatible.
-
If you want to check if a file exists on the server you can use the file_exist function.
-
[SOLVED] Polling php install question
wildteen88 replied to mbdonner's topic in PHP Installation and Configuration
post your config.inc.php here, sensor out your database credentials. Please use the code tags ( ) when you post the code. -
Try using mjdamato code (the while loop part) with your sql join. Its a not a problem with the query. You've now got to process the results.
-
[SOLVED] Polling php install question
wildteen88 replied to mbdonner's topic in PHP Installation and Configuration
Try using the following define(templatedir, $_SERVER['DOCUMENT_ROOT'] . '/poll/templates/'); -
no. PHP is server side. If PHP can easily grab files of your computer how unsecured would the internet be!
-
it pings your ipaddress with a port number
-
You're far better of doing a join than multiple queries. joins are quite easy once you get the hang of them. To learn how to use joins go through the tutorials @ w3schools.com
-
Yes it'll be the 4th row. Arrays start at 0 and not 1 also the dots before and after the variable are called concatenation operators they allow you to tie strings and variables together.