wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
$HTTP_POST_VARS has been depreciated, use $_POST instead Also functions only return variables values, they do not return the actual variable. You'll have to catch the returned value by assigning a variable to the function call, example: $oData = uploadFile($_POST, 'form_data'); Any data that uploadFile will return will be assigned to the $oData variable.
-
php 5.2.5 not working on Apache 2.2.8
wildteen88 replied to obyno's topic in PHP Installation and Configuration
Do you have to use CGI? PHP can be configured using the provided Apache Module, however you'll need to use the php5apache2_2.dll module if you're using Apache2.2.x. -
These two lines in your javascript l.left = x; l.top = y; need to be: l.left = x + 'px'; l.top = y + 'px'; You must provide the unit.
-
How did you get the code in the first place? Looking at the code the two functions uploadFile and createThumbnail are part of a class. You will need to initiate the class first and then call the uploadFile method (the createThumbnail method gets called by uploadFile method).
-
Another IIS and PHP 5.5 Issues with extensions
wildteen88 replied to 2revup's topic in PHP Installation and Configuration
Make sure PHP is reading the php.ini you are editing, which should be C:/php/php.ini (which I guess is where you php.ini is located from what I read above) . You can check this by running phpinfo() and looking at the line that starts with Loaded Configuration File, after that will be the full path to the php.ini PHP is reading, is the path mentioned correct? By envir variables do you mean the PATH? Adding PHP to the PATH should help. -
Why will some variables work but not others?
wildteen88 replied to hiveman's topic in PHP Coding Help
How is the $Large_Image and $Description variables created? You'll need to post some code. -
I advise you to re-read my post and follow the steps I mention. Moving files outside of the php folder can cause more problems, espcially when you may want to upgrade PHP in the future. You may forget that you have moved xyz file outside of the PHP installation folder. This is why I advise you to add PHP to the Path that way you do not need to move any files outside of the PHP installation folder, as PHP will automatically check the Path variable upon startup. Umm, It is in my php.ini. I use the configuration in php.ini-recommended and then rename it to php.ini which will provide all configuration options. Prehaps the Installer generates custom php.ini upon the configuration options you chose during installation. I haven't used the installer in a long time I prefer the zip package. Make sure you have setup the session.save_path directive to c:\PHP\sessions Also make sure there is not a semi-colon ( ; ) at the start of the line either. It there is PHP will ignore it. Lines that start with a semi-colon will be considered as comments. NOTE: When ever you make any modification to the php.ini make sure you restart your webserver.
-
Oops! O_o yeah I meant the name of the field not the value sorry, code corrected: <b>Tip</b><input type=\"text\" name=\"tip[]\" value=\"$tip\"> <b>Time</b><input type=\"text\" name=\"time\" value=\"$time\">
-
Ok, first of all move any files you have moved outside of the php installation folder back to it. Second step is to add PHP to the Windows Path. NOTE: Make sure you do restart Windows after modifying the path. Third step open the php.ini within your php installation directory and modify the extension_dir directive to be to set to where the ext/ folder is located, example: extension_dir = "C:/php/ext" Next scoll down and uncomment the extension=php_mysql.dll line. Save the php.ini and restart your webserver (eg IIS, Apache). Run a script with the following code: <?php phpinfo(); ?> Verify that the line that starts with Loaded Configuration File is set to the path of your php installation directory (eg: C:/php/php.ini), if it does scroll down and see if you can see a MySQL heading. If you do the MySQL extension is now enabled and you should be able to use PHP with MySQL.
-
Use the following code instead: <b>Tip</b><input type=\"text\" name=\"tip\" value=\"{$tip}[]\"> <b>Time</b><input type=\"text\" name=\"time\" value=\"$time\"> Ending a field name with [] will make the browser submit it as an array. So when you retrieve $_POST['tip'], it will hold an array rather than a string value. So $_POST['tip][0] will be the first field, $_POST['tip'][1] will be the second an so on.
-
[SOLVED] PHP version update help
wildteen88 replied to zhinigami's topic in PHP Installation and Configuration
If you have XAMPP installed then I'd recommend you to upgrade XAMPP itself rather than a component. -
If you use that HTML it' should place the ad in the center of the page. You should read up on HTML and CSS to grasp the basics. Also this has nothing to do with PHP.
-
Make sure the mssql extension is enabled within the php.ini, currently mssql is not enabled with your php setup this is why you're getting the undefined function mssql_connect error message
-
[SOLVED] Formating text from a database entry in php 5
wildteen88 replied to leest's topic in MySQL Help
More code is needed. nl2br is supported by PHP4 and 5 -
If you want to connect to an SQL database with PHP you'll need to use the mssql_* functions or odbc_* functions. The mysql_* functions are for use with MySQL databases only. As for connecting to an SQL server through Dreamweaver you'll have to download an extension for that. Dreamweaver by default comes only with MySQL database support.
-
Remove the quotes on this line: $total = "$total + ($price * $quan)";
-
This part: MySQL Server: COMPUTERNAME\SQLEXPRESS Should be set to localhost Make sure MySQL is running before attempting a connection.
-
Server configuration for .htpassword and .htaccess
wildteen88 replied to zuze's topic in Apache HTTP Server
Make sure you have set the AllowOverride directive to All within the main <Directory /your/document/root/here></Driectory> block. -
[SOLVED] PHP version update help
wildteen88 replied to zhinigami's topic in PHP Installation and Configuration
How was PHP installed originally? Did it come as part of a preconfigured AMP package such as WAMP or XAMPP? Or did you install it yourself using the PHP installer? If its the latter you should be able to just download the zipped binaries packagefrom php.net (not the installer). Once downloaded just extract the contents of the zip to where you have installed PHP to, making sure you overwrite existing files/folders. PHP should now be updated. -
You'll find it easier if you use mysql_fetch_assoc rather than mysql_result: $querydata = "SELECT data1, data2, data3, data4, color FROM tblgraphdata WHERE graphID ='1'"; $resultsdata = mysql_query($querydata) or die ("Problem with query:" . mysql_error()); while ($row = mysql_fetch_assoc($resultsdata)) { $rowdata[] = $row; // add returned results from $row intop $rowdata array. } echo '<pre>' . print_r($rowdata, true) . '</pre>';
-
if you are listing your fields in your query, then you can remove the fields which will receive a null value. mysql_query("INSERT INTO topics (Name, CBy, Last_post, Board) VALUES('$mtit', '$usernamem', NOW(), '$boardA') ") or die(mysql_error()); mysql_query("INSERT INTO messages (topic, username, time, message, board) VALUES('its here i need to find out that null value entered', '$usernamem', NOW(), '$mcont', '$boardA') ") or die(mysql_error());
-
If you are sending the username over the url then use urlencode. This function will convert your string so it is url safe. When you receive the username use urldecode to convert the url-encoded string back to the original
-
Add C:/Program Files/PHP to the Windows Path The mysql extension (php_mysql.dll) requires an external library (libmysql.dll) in order to function properly. libmysql.dll is located in the root of PHP's installation folder. By default PHP cannot read its own directory structure, adding PHP to the Path will allow PHP to do this. Note: Make sure you do restart Windows when you add PHP to the PATH. If PHP is still not loading the mysql extension make sure PHP is is reading the php.ini you are modifying by running phpinfo(); function within a script and looking at the line that starts with Loaded Configuration File Also if you have used the Installer to install PHP, please go to php.net and download the zipped binary package and extract the contents of the zip to your PHP installation directory, making sure you overwrite existing files/folders. The Installer comes with limited files
-
Why would you use a from to grab information based on the class the user clicked on? You'd be better of using a normal hyperlink and sending a query string instead. Eg: The link for Period 1 you'd do this <ul> <li><a href="class.php?period=1">Period 1</a></li> </ul> For the next period link you'll use the following: class.php?period=2 etc In class.php you'd use the following code for returning specific information based on the period number sent in the link <?php // Get the period id number from the query string if(isset($_GET['period']) && is_numeric($_GET['period'])) { $requested_period = $_GET['period']; } // period id number is not present or is invalid, we'll set the requested_period variable to the string "invalid". // This will be used later on. else { $requested_period = 'invalid'; } // Now that we have the period id we can return the data based on that id switch($requested_period) { case '1': // show information for period1 break; case '2': // show information for period2 break; case '3': // show information for period3 break; case '4': // show information for period4 break; case '5': // show information for period5 break; case 'invalid': default: // show error message, as the provided id number does not exists or is not present break; }