wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
You cant from a remote location, you have to be at the computer to see its ip address. Just go to places like whois.com to get your computers ip address.
-
Yes, this is all explained on the dyndns website. I am not an expert in the field of types of IP address, there are two main types static and dynamic. Static is self explanatory, the address never changes. Where as dynamic IP addresses can change. How and when the addresses changes is handled by your ISP. It can change every minute/hour or day/week. When your connect to the internet or turn your computer on etc. To get an understanding of what these terms mean head over to wikipedia for a more thorough explanation.
-
Its \r\n for Windows. But anyway I said before (which I think everyone missed:
-
When using \r or \n make sure you use double quotes and not single quotes. I swap this line: $textareadescription = str_replace('\r','\n',$textareadescription); for $textareadescription = str_replace(array("\r", "\r\n"), "\n", $textareadescription); That will standardise the new line characters (to just \n). You do not need to use OS specific new line characters in a web page. The web browser should handle the new lines for you.
-
You use the ipaddress your ISP assigns your computer when you connect to the internet. However I can see one problem, which is your ISP assigns you a dynamic IP address (I can tell this as every post you have made here your IP address changes). As your IP changes it'll be hard to know which address to use connect to your computer remotely. I suggest you to sign up to a free service called dynDNS.org.
-
Yes, use file_get_contents to get the data from info.txt to the textarea. Then use file_put_contents to overwrite the changes. check the manual on how to use these functions.
-
The following foreach($categories as $key => $category) { echo 'Category #' . ($key+1) . '<br />'; foreach($category as $page) { echo $page . '<br />'; } echo '<hr />'; } does the same as for ($i = 0;$i<=$max;$i++){ for ($j = 0;$j<=5;$j++){ echo $array[$i][$j]; } } $categoriesis formatted like so: // category 1 $categories[0][0] = 'page1'; $categories[0][1] = 'page2'; $categories[0][2] = 'page3'; // category2 $categories[1][0] = 'page1'; $categories[1][1] = 'page2'; $categories[1][2] = 'page3';
-
Where is the $num_rows variable set to? Your for loop wont run unless this variable is set.
-
Best place is the manual. If its very simple syntax.
-
Sorry I wasn't clear earlier, change if ($_POST['mysql_result($query_field_desc_i, $cntr)'] == '') { to if ($_POST[mysql_result($query_field_desc_i, $cntr)] == '') { You don't need to use quotes in the $_POST array when a value is returned from a variable/function.
-
recursive function to modify array not working
wildteen88 replied to arianhojat's topic in PHP Coding Help
Use: function unset_required_fields(&$array) { foreach($array as $key => $value) { if( is_array($value) ) { unset_required_fields($array[$key]); } else if( $key == 'required') { $array[$key] = 0; } } } Any changes made to the $value variable will not have any affect on the passed array. When running unset_required_fields function within your loop you should pass the actual array itself. -
What are you trying to do? The $_POST superglobal is for returning data submitted from a form. You may aswell join the two queries in to one: $query_req_fields = "SELECT required FROM temp_tbl"; $result_req_fields = mysql_query($query_req_fields,$link); $query_field_desc_i = "SELECT field_desc_i FROM temp_tbl"; $result_field_desc_i = mysql_query($query_field_desc_i,$link); Aviod using mysql_result use one of the mysql_fetch_* functions instead, allows for much cleaner code. Also make sure you use square brakets after the $_POST var, rather than parenthesis, eg: $_POST['field_name'] not $_POST('field_name')
-
Yes ../ is to go one level higher. To go down a level you specify the directory in the current level. However I highly suggest PFMaBiSmAd's comment. When using include's always do include $_SERVER['DOCUMENT_ROOT'] . 'path/to/file.php' This eliminates the need to use ../ in your paths. PHP will locate files from your websites root folder (where you upload your sites files to).
-
You need to explain more clearly, what do you mean by What loop? What's with all those constants in the $stats variable.
-
accessing local host from another machine
wildteen88 replied to cleary1981's topic in PHP Installation and Configuration
You'll use the ip address of the computer which has wamp installed. eg http://192.168.1.2:8080/ You wont use http://localhost -
How did you try accessing Xampp? Remote access wont just "work" by installing Xampp. A whole range of things needs to configured, such as your router and firewall.
-
Can't send PM, need to contact...
wildteen88 replied to nba1985's topic in PHPFreaks.com Website Feedback
You'll need to have 10 or more posts, in order to send PM's. -
It is better to use an array, rather than unique variables. Just use: $lines = file('PROBINFO.cap'); $lines holds an array of lines from the propinfo file, eg $line[0] is the first line, $line[1] is the second etc.
-
PHP files with mysql code are causing apache to close
wildteen88 replied to TCool's topic in MySQL Help
Try not to move any files outside of the PHP Installation folder. Keep all files that come with PHP within the installtion folder. You should add the PHP installation folder to the PATH Environment Variable instead. Moving files can cause problems when you go to upgrade PHP later on. upon uninstallation, PHP will not automatically remove files you have moved. -
[SOLVED] Max value in a decimal field
wildteen88 replied to stockton's topic in Microsoft SQL - MSSQL
We do have a sub forum for support with different SQL databases (MySQL, MSSQL, PostgreSQL etc) here. I'll move this to the MSSQL forum. EDIT: I must be blind its already been moved. Ignore what I said -
Strange, are you sure that is line 27. Can you post the contents of gallery.php (within in tags).
-
So http://127.0.0.1 works by http://localhost doesn't? If that the case have at the hosts file (C:\WINDOWS\system32\drivers\etc). Make sure there is the following line in there: 127.0.0.1 localhost If its not added. Save the hosts file. Re-test http://localhost/
-
All the above errors are caused by the first error. You'll need to sort the first error in order for the rest to be resolved.
-
Strange, does http://127.0.0.1 load anything? If it does then it seems your Windows hosts file is at fault.