jazzman1
Staff Alumni-
Posts
2,713 -
Joined
-
Last visited
-
Days Won
12
Everything posted by jazzman1
-
You don't need from a spacial tool to achieve that. You have to hire someone to write down the script for you. Be aware, that most of the web hosting providers disable a ping command by default.
-
MOUSE SCROLLING WEHN USING THIS PHP CODE. (VERSION 2)
jazzman1 replied to rleahong's topic in PHP Coding Help
Buy a new mouse or a new machine. How old is your computer? -
This regExp accept only letters, numbers and underscores inside file's name. RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^([a-zA-Z_0-9]+)/?$ $1\.php [L,QSA] PS: The slash symbol is optional.
-
Nothing wrong. I've got an error last night by reason of my typo, I saw it this morning. Can you attach the file to this forum or send to me by PM.
-
Wrong header containing a syntax error(s). Replace your header with mine and everything should be fine I think. Make sure that the database "ex_address" is already exist inside mysql server. PS: Use code tags in the future!
-
Re-read my last reply. Make a test and give us the result.
-
You should add the slash at the end as an option in the URL. Change: RewriteRule ^(.+)$ $1.php [L,QSA] to RewriteRule ^(.+)/?$ $1.php [L,QSA]
-
According to your first post the dump file is a .sql. Open up with your text editor and let's check the header of that file.
-
Can you post the part of your dumping sql file until database selection? For example: -- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 05, 2013 at 01:26 AM -- Server version: 5.5.27 -- PHP Version: 5.4.7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `guestbook`
-
Read them: 1. Find a good php editor 2. Php security tutorial 3. Debugging: A Beginner's guide 4. How To Ask Questions The Smart Way 5. PHP Resources & FAQs
-
You should also learn how to debug your scripts. Php provides a lots of good debugging functions itself. Have you ever heard about them?
-
Hey gardener, good for you Just create a second rule that matches the pattern of your URL, which, you expected to be.
-
Yep, it works as expected. Test - http://canada.lesno.net/Gardenable
-
Labels and values not appearing on the same line.
jazzman1 replied to aquatradehub's topic in PHP Coding Help
If you are new in php, don't waste your time learning the mysql library. This library is gonna be deprecated from a version 5.5 in php, I think. You should have start learning PDO or MySQLi. -
PHP is NOT C
-
Labels and values not appearing on the same line.
jazzman1 replied to aquatradehub's topic in PHP Coding Help
Change: $con=mysqli_connect('localhost', 'username', 'password', 'equatics_tropics'); to $con=mysql_connect('localhost', 'username', 'password') or die(mysql_error()); mysql_select_db('equatics_tropics') or die(mysql_error()); PS: Don't remove anything from your vsprintf function. Just check how many arguments it takes, that's all I think. -
Labels and values not appearing on the same line.
jazzman1 replied to aquatradehub's topic in PHP Coding Help
There are two different libraries. Go to php.net and check out how to use mysqli or pdo. Stop using mysql! -
Labels and values not appearing on the same line.
jazzman1 replied to aquatradehub's topic in PHP Coding Help
Why are you using mysqli and mysql on the same script? -
1. Rewrite all URL's from your index.php file <ul> <li><a href="./home">Home</a></li> <li><a href="./about">About</a></li> <li><a href="./products">Products</a></li> <li><a href="./services">Services</a></li> <li><a href="./contact_us">Contact Us</a></li> </ul> Or, with capital letters <ul> <li><a href="./Home">Home</a></li> <li><a href="./About">About</a></li> <li><a href="./Products">Products</a></li> <li><a href="./Services">Services</a></li> <li><a href="./Contact_us">Contact Us</a></li> </ul> 2. Create a .htaccess file in the same directory where the index file is: RewriteEngine on RewriteBase /Gardenable/ RewriteRule ^/?([a-zA-Z_]+)$ index.php?page=$1 [L] Try to run the script again and tell me what resuts you're getting.
-
PHP Parse error: syntax error, unexpected T_VARIABLE
jazzman1 replied to phpnewbieca's topic in PHP Coding Help
Check if the file exist and also it's readle and writable. -
PHP/MySQL INSERT INTO Multiple Tables from Basic Form
jazzman1 replied to kanoy83's topic in PHP Coding Help
Create a stored procedure in mysql and call it inside the php script. Take a look at that examples - http://php.net/manual/en/mysqli.quickstart.stored-procedures.php- 3 replies
-
- insert into
- phpmysql
-
(and 1 more)
Tagged with:
-
Sending emails in a foreach loop. Best way to do this?
jazzman1 replied to eMonk's topic in PHP Coding Help
Mails in a loop or mail function insde a loop - NEVER. Put everything into array() and implode them. Something like: // this data comes from the database $headerFields = array('BCC: example_1@example.com,example_2@example.com,example_3@example.com,example_4@example.com,example_5@example.com'); $headers = 'MIME-Version: 1.0' . "\n" . 'Content-type: text/plain; charset=UTF-8' . "\n" . 'Content-Transfer-Encoding: base64' . "\n"; 'X-Priority: 1 (Higuest)' . "\n"; 'X-MSMail-Priority: High' . "\n"; 'Importance: High' . "\n"; $headers .= implode(',', $headerFields)."\n"; $message = "UserName: $user_name \n UserPass: $password \n"; if(mail(null, '=?UTF-8?B?'.base64_encode($subject).'?=', base64_encode($message), $headers . '')){ echo "Message sent"; /* redirect the page */ exit; } else { echo "Message failed"; } -
For sure, you sould have to optimize your database and tables. Watch these 9 vidoes. To escape the character strings, you can try to run this update query instead yours: $query = sprintf("UPDATE `pagina` SET `title` = '%s', `korting`='%s', `volg`='%s', `product` = '%s',`product_id`=%u, `visible` = '%s', `metadescription` = '%s', `url` = '%s', `content` = '%s', `headerpicture`='%s',`picture`='%s', `form_id` = %u,`related`='%s', `datum` = NOW() WHERE `id`=%u", mysql_real_escape_string($title), mysql_real_escape_string($korting), mysql_real_escape_string($volg), mysql_real_escape_string($product), intval($product_id), mysql_real_escape_string($visible), mysql_real_escape_string($metadescription), mysql_real_escape_string($url), mysql_real_escape_string($content), mysql_real_escape_string($headerpicture), mysql_real_escape_string($picture), intval($form_id), mysql_real_escape_string($related_string), intval($id));
-
Yes, b/s you need to use a sql select statement to retrieve the data from the db server.
-
PHP Parse error: syntax error, unexpected T_VARIABLE
jazzman1 replied to phpnewbieca's topic in PHP Coding Help
Does the text and scripting files are located on the same directory?