wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
Try this: [code]echo <<<EOF <tr> <td><img src="images/cat_left_top.jpg" width="180" height="40"></td> </tr> EOF; $categories = mysql_query("SELECT * FROM store_categories ORDER BY id"); while($c = mysql_fetch_assoc($categories)) { echo <<<EOF <tr> <td class="cat_text"> <a href="?list={$c['id']}"{$c['categorie_name']}</a> EOF; if(isset($_GET['list']) && is_numeric($_GET['list']) && $_GET['list'] == $c['id']) { $_GET['list'] = mysql_real_Escape_string($_GET['list']); $c_list = mysql_query("SELECT * FROM store_categorie_list WHERE list_categorie_id='{$_GET['list']}' ORDER BY id"); echo "\t\t\t<p>\n"; while($c_list_item = mysql_fetch_assoc($c_list)) { echo "\t\t\t--- {$categorie_list_get['list_name']}<br />\n"; } } echo <<<EOF </p> </td> </tr> EOF; } echo <<<EOF <tr> <td height="0"><hr align="center" width="170" size="1" noshade class="cat_bar"></td> </tr> EOF;[/code]
-
To add comments in CSS you'll have to use the following syntax: [b]\* my comment here *\[/b] (not \*/*) there is no other style of comment in CSS.
-
Try surrounding it in quotes: [code]php_value include_path ".:/home2/username/includefolder1:/home2/username/public_html/php:/usr/lib/php:/usr/local/lib/php" [/code] Also make sure you have changed [b]/home2/username/includefolder1[/b] and [b]/home2/username/public_html/php:/[/b] to the correct location. If it still doesnt work ask you hosts whether you can use the php_value directive in a .htaccess file. If that doesnt work. Then you'll define the location of the files in your script. You can create a constent called INC_PATH, this constant will then holds the path to your include folder, where all you include files are located [code=php:0]define('INC_PATH', '/path/to/my/include/folder/');[/code] Then when you want to include a file that is in your include folder you'll use the following: [code=php:0]include INC_PATH . 'filetoinclude.php';[/code] That is the only otherway if you host doesnt allow you to use your own php.ini and has disabled the php_value directive in the .htaccess file.
-
For removing the 'It Works' page when you goto http://localhost/ remove all the Apache html files from the htdocs folder that start with [b]index.html.[i]x[/i][/b] - x being the abbriviated language, eg index.html.en and any files prefixed with apache_ eg: apache_pb2.gif For your secound question you'll need to edit the httpd.conf file and find the following: [code]DirectoryIndex index.html index.html.var[/code] Change the above line to this: [code]DirectoryIndex index.html index.html.var index.php[/code] Save the httpd.conf file and restart the Apache server. Now when you go to http://localhost/administrator/ it should automatically loadup the index.php page. This affects any other folder to. So fi you goto http://locahost/somefolde/ Apache will automatically look for a index file listed in the DirectoryIndex directive.
-
looms like you have magic quotes enabled whcih is why your quotes are being escaped. To stop it from the doing that you should turn magic quotes off by either edting the php.ini if your host allows it or you can do it via the htaccess file. If you cannot edit the php.ini or use .htaccess files then you can use stripslashes function, which will remove the escape character from the quotes.
-
Add an empty .htaccess file into the root of the htdocs folder, or whatever folder you use to store your php script. Now add the following into the .htaccess file: [code]php_flag register_globals On[/code] Does youre script work now? Also run the function phpinof() and see if register_globals is enabled under the Master Value. if its and your script doesnt work still then there is a problem with your script.
-
You should validate the postset then. Making sure it is of a numeric value by using is_numeric and making sure postset doesnt exceed the number 8, like so: [code=php:0]if(is_numeric($_GET['postset']) && ($_GET['postset'] <= '8')) { // postset is safe! }[/code]
-
You can still use the superglobals, eg _GET, _POST, _SESSION etc, when regsiter globals is enabled. Also make sure you are edting correct the php.ini that is located in /opt/lampp/etc/ (linux) or xampp\apache\conf (windows) And make sure you are editing the value of register_gloabls in the correct place too in the php.ini. Make sure you are not editing anything that is after any semi-colons (;). To change the value of register globals find the following: [code]; to possible security problems, if the code is not very well thought of.[/code] That is around line 456, However this maybe different for you. After that is where you change the register_gloabls setting.
-
Use [url=http://php.net/urlencode]urlencode[/url]. On the values from your form inputs. So you'll want to do something like this: [code=php:0]$name = urlencode($HTTP_POST_VARS['Name']); $class = urlencode($HTTP_POST_VARS['Class'];) $level = urlencode($HTTP_POST_VARS['Level']);[/code] When you retrieve the them from url you'll wnt to decode then with [url=http://php.net/urldecode]urldecode[/url] Eg: [code=php:0]$name = urldecode($HTTP_GET_VARS['Name']); $class = urldecode($HTTP_GET_VARS['Class'];) $level = urldecode($HTTP_GET_VARS['Level']);[/code]
-
Cannot start Apache 2
wildteen88 replied to vbnullchar's topic in PHP Installation and Configuration
Probably want to run [i]sudo ./apachectl -k restart[/i] -
What is the extension_dir setting set to in the php.ini? And where is you php.ini located to? if the extension dir is set to [b]./[/b] you'll have to setup the extension dir. So change to ./ to the full path where your php extensions folder is, for example if you installed php in the root of the hard drive, then the location to the extension folder would be: [b]C:/php/ext[/b] - (NOTE: if you have php4 you'll want to use [b]C:/php/extensions[/b]) When you ahve setup the extension_dir save the php.ini and restart your server.
-
Basically check that you have 31 columns within your user table. And the values in your query match up to those columns What I think fenway meant was to lists you columns in your query: eg: [code]INSERT INTO user (col1, col2, col3, .. etc .. ) Values ('localhost', 'toto', .. etc ..)[/code] Obvioulsy you'll want to change where it says colx - x being a number - to the actuall column name you have in your database.
-
remove echo and it'll work. So do this: $id = $_GET['id_eve'];
-
What I think Dan means is to valid the zipcode the user provides. For example checking that the zipocode is in the correct format and is valid. You can do this using regular expressions and using a function called preg_match.
-
Also when you define width/heights/sizes etc you have define the unit, eg pixels (px), points (pt) etc, percentage (%). So rather than this: [code] table.center { width: 200; height: 200; text-align: center; color: blue; font-family: arial; } td.center { text-align: center; color: blue; font-family: arial; }[/code] It should be like this: [code] table.center { width: 200px; /* <-- 200pixels wide */ height: 200px ; /* <-- 200pixels high */ margin: 1px auto; /* <-- to center the table */ color: blue; font-family: arial; /* <-- Ideally you should have more than 1 font here. Not all OS's will have the Arial font */ /* The above should be like this: font-family: Arial, Helvetica, sans-serif; */ }[/code] Note /* */ is a CSS comment.
-
No the mail: protocol will open up your defualt email client. You send you email through that. PHP on the other hand uses an SMTP server to send the email when you use the mail function.
-
You'll have to add those bits in if you want to send them with the email.
-
That is not sending the mail. What that does is opens up your email client, eg Outlook Express, Thunderbird or what ever your email client is. It is then down to you to send the email yourself by clicking the Send button in your email client. Plus its not javascript either. Its actually to do with the [b]mailto:[/b] protocol for your link. You're using javascript to populate the email subject and the body of the email.
-
@techiefreak05 the site posted by hostfreak is acutally what you want to read. As is it doing basically what you want to do. The difference is its rewriting a query string. This is the mod rewrite code you'll want to use: [code]# Turn on the rewrite engine RewriteEngine On # the rewriter tule to use: RewriteRule ^user$ /user.html[/code] You add the above the the htaccess file thatg is in the same folder as user.html. When you goto mysite.com/user it'll load up user.html. @vivek - Please do not hijack other peoples threads. Please create your own thread. However I'll answer you question - I'm quite new to mod rewrite but I dont think it is possible to do that. Mod rewrite can only rewrite whats after you websites address. Prehaps you might want to look into virtual hosts if you want to create a subdomain.
-
LIKE PHP can we able to send MAIL through JAVASCRIPT????????
wildteen88 replied to rajmohan's topic in PHP Coding Help
Thread closed. Please do not post multiple instances of the same threads/questions in different forums. You already asking this same question [url=http://www.phpfreaks.com/forums/index.php/topic,108896.0.html]here[/url]. -
AFAIK javascript doesnt have that sort of ability. Javascript runs on the client and can only do client side operations, so it cannot talk to the server to send an email from the local mail server that might be installed. If you want to send an email from your site you'll want to use a server side programming langauge in order to send an email, such as PHP and use the built in mail function - provided you have a local SMTP server installed and PHP is setup to use that SMTP server. Or your friend might be getting his wires crosed with jsp, which is a server side version of javascript. Which I belive can send emails.
-
Yes replies to threads/posts here are very quick at times. You will usually get a reply to your thread within a 1 minute or 2 here. I would like to welcome you too to phpfreaks.com.
-
You can change the color of the links, just sprinkle a bit of CSS on to them to change the color of your links. You can give links seperate colors too if you give the link you want a different color a class. Then can use this CSS: a.class { color: #RRBBGG or a color name } So if you want a link that has a class called className the links will be pink. a.className { color: pink; } The html [code]<a class="className" href="blah">Blah balah</a>[/code]
-
Is it possible to post variables to a webpage without form?
wildteen88 replied to warpdesign's topic in PHP Coding Help
You'll probably want to use a session then. if you dont want to use a form. -
PLease use the forums search feature this has been asked many times over. There are plenty of threads out their that discuss this.