-
Replied To a Post in How to send a mail in php using onclick function
Also, the method name in `$this->__('Email Me')` does not seem to be valid or is my knowledge of PHP a bit shaky? -
Replied To a Post in helpNotice: Use of undefined constant username - assumed 'username'
Also the query SELECT * FROM username looks suspicious. Usually it looks like: "SELECT * FROM users WHERE username='" . mysqli_real_escape_string($username) . "' AND password='" . yourHashFunction($password) . "'"; Regarding … -
Began Watching helpNotice: Use of undefined constant username - assumed 'username'
<?php session_start(); $username = $_POST['username']; $password = $_POST['password']; Notice: Use of undefined constant username - assumed 'username' if (username&&password) <?php session_start(); $username = $_POST['username']; $password = $_POST['password']; if (username&&password) { … -
Replied To a Post in helpNotice: Use of undefined constant username - assumed 'username'
Line 7: change it to (add the $ sign): if ($username && $password) Hopefully you use prepared statements or do some sanitizing of input variables before using them in queries/urls/html/mail/script. -
Stopped Watching Split Session values
How to split session values? I am getting error like "Notice: Array to string conversion in PHP" in session; How to solve that? -
Stopped Watching Syntax error
Hi im attempting to copy a php code and get it to work with a script im trying to create and i have come across the error below can anyone … -
Stopped Watching Simple online Email form
Hi, If anybody want to test simple email online form, here is a sample: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> … -
Replied To a Post in Email Form Not Sending Message
The form in the code for contact.html you posted above lacks the action attribute. It should be: <form name="sentMessage" id="contactForm" novalidate action="contact_me.php"> If I add the action atribute, the form … -
Replied To a Post in Email Form Not Sending Message
Sorry, I was wrong. The form page does not need to have a php extension since there is no php code in it. All the code is in the contact_me-php … -
Replied To a Post in Email Form Not Sending Message
So rename the contact.html to contact.php. Otherwise it wont work. -
Replied To a Post in Email Form Not Sending Message
Yes, any script that has php code should have a php extension. And remove the return statements. -
Began Watching Simple online Email form
Hi, If anybody want to test simple email online form, here is a sample: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> … -
Replied To a Post in Simple online Email form
There is no form in this script. What is the purpose here? -
Began Watching Email Form Not Sending Message
I have this email code from a website template that I want to use for my site. The problem is that when I click on the "Send message" button, the … -
Replied To a Post in Email Form Not Sending Message
The code is basically OK except for the `return` statements. Why do you use them? Are the PHP scripts being called using the `include/require` statements? And make sure your first … -
Replied To a Post in How can i get a Highest value from multidimensional Array from mysql?
Have you tried it? It works with the above two dimensional array. -
Began Watching How can i get a Highest value from multidimensional Array from mysql?
Hi guys! Im trying to get the ighest value from any array coming from mysql query. What i've till now is it! class vfsClass{ function localvfs() { try { $sql … -
Replied To a Post in How can i get a Highest value from multidimensional Array from mysql?
Or use recursion, maybe sometnihg like this (not thoroughly tested, just to show the concept): function findMax($array, $curMax) { foreach($array as $val) { if(is_array($val)) { $curMax = findMax($val, $curMax); } … -
Stopped Watching Image description
Hi guys, I have a bit of code that displays an objects image, when you hover over it, it also shows the name of that object. What I would like, … -
Stopped Watching Change marker on html element hover
I would like to change the icon of a marker while hovering on a HTML element. My markers are generated in a PHP array, which looks like this: $map_flats[] = … -
Replied To a Post in what is error in this code
Just a note @toxicandy: `!==` is also a valid syntax. In PHP you can use three comparison operators in place of two which means you want to compare both values … -
Began Watching how craete filter for input in php
hello how create filter for input password in php -
Replied To a Post in how craete filter for input in php
Depending on what your password requirements are and what your approach is. Once you hash a password the hash will contain only database safe characters. I would expect you do … -
Began Watching what is error in this code
i want to know the error in this code <?php $firstname = $_POST ['firstname']; $lastname = $_POST ['lastname']; $pass1 = md5($_POST['pass1']); $pass2 = md5($_POST['pass2']); $email = $_POST ['email']; // filters … -
Replied To a Post in what is error in this code
There seem to be no syntax errors. Why do you assume there is an error? Do you get any messages? Is the result not what you expected? What is different … -
Began Watching Split Session values
How to split session values? I am getting error like "Notice: Array to string conversion in PHP" in session; How to solve that? -
Replied To a Post in Split Session values
Split on what condition? Give an example of a session variable you have and how would you like to have it split. -
Replied To a Post in Syntax error
As Lau_1 pointed out you had a double quote missing at the end of the query. -
Replied To a Post in Syntax error
Now, it is hard to tell which double quote is causing the error. I prefer to write queries in a bit cleaner form, using single quotes for mysql string values … -
Began Watching Syntax error
Hi im attempting to copy a php code and get it to work with a script im trying to create and i have come across the error below can anyone … -
Replied To a Post in Syntax error
You use `to` as the field name but `to` is also a mysql reserved word. So if you realy want to use it for a field name, enclose it in … -
Stopped Watching Can Xampp Be Used For An Intranet Production Server
Hello everyone, I have been using xampp for my web app developments for quite a while now. Usually after the app development is done, I upload my files to paid … -
Replied To a Post in Image description
Yes, the code is OK and should display the description when hovered over image (even if the image was not displayed due to incorrect path). Check out the css code … -
Replied To a Post in Image description
The code above works fine for me. Can you please post the generated HTML for your image (right click in the browser -> View page source). -
Began Watching Image description
Hi guys, I have a bit of code that displays an objects image, when you hover over it, it also shows the name of that object. What I would like, … -
Replied To a Post in Image description
Just give the `title` attribute a correct value to display the description. In your case line 7 would be: echo '<div class="imageObject"><img src="ressources/images/objects/', $P_Element, '.jpg" width="150" height="150" hspace=0 vspace=0 title="', … -
Began Watching Change marker on html element hover
I would like to change the icon of a marker while hovering on a HTML element. My markers are generated in a PHP array, which looks like this: $map_flats[] = … -
Replied To a Post in Change marker on html element hover
Depends on how you display the icon. One way of doing it is using a CSS background property: div.ofsomeclass { background-color: #FFFFFF background-image: url("some/location/marker-green.png"); background-repeat: no-repeat; background-position: letf top; } … -
Stopped Watching second half code not executing
Executing Code upto insert users: <?php require('session.php'); require('encrypt.php'); require('mail.php'); $username = $_POST['user_name']; $password = rand(10000, 99999); $name = $_POST['name']; $password = encrypt($password, 'ganesh'); $email = $_POST['email']; $terms = $_POST['terms']; $address … -
Began Watching Can Xampp Be Used For An Intranet Production Server
Hello everyone, I have been using xampp for my web app developments for quite a while now. Usually after the app development is done, I upload my files to paid … -
Replied To a Post in Can Xampp Be Used For An Intranet Production Server
In my opinion and experience the answer is yes. I know of one organization that uses xampp on a windows server for an intranet app that serves say a hundred … -
Stopped Watching replace word in string with matching key=>value in assoc array
Hi, I have a string that can look a little different from time to time. String Example 1: ((823584X80X998.NAOK == "1")) String Example 2: ((823584X80X1001.NAOK == "1" or 823584X80X1001.NAOK == … -
Replied To a Post in second half code not executing
The query looks OK now. Have you tested it in phpmyadmin? -
Began Watching second half code not executing
Executing Code upto insert users: <?php require('session.php'); require('encrypt.php'); require('mail.php'); $username = $_POST['user_name']; $password = rand(10000, 99999); $name = $_POST['name']; $password = encrypt($password, 'ganesh'); $email = $_POST['email']; $terms = $_POST['terms']; $address … -
Replied To a Post in second half code not executing
Insert this simple debug code after line 115: die($q); It will display the query as it has been constructed and stop the script. Now you can inspect the query and … -
Gave Reputation to diafol in replace word in string with matching key=>value in assoc array
How about a simple preg match and replace? About 9 lines of code should do it? function change_keys($query, $questionArray, $patternPre, $pattern, $patternPost) { $pattern = $patternPre . $pattern . $patternPost; … -
Replied To a Post in replace word in string with matching key=>value in assoc array
Just noticed. The above example will work only if you have `OR` operators. To take into account other operators the explode will not work. A function can be prepared for … -
Replied To a Post in replace word in string with matching key=>value in assoc array
I hope this is what you want (see comments in the code): // test data $mainArray = array( '823584X80X998.NAOK' => array('question_properties' => array('qid' => 998, 'name' => 'F8')), '823584X80X1001.NAOK' => … -
Stopped Watching How to go back while click on image using fpdf in php
I am not getting while clicking on image my code $pdf->Image('logo.png',10,20,33,0,' ','http://www.fpdf.org/'); working but I want to display the local file. Mean click on image it will go the the … -
Stopped Watching How to go back while click on image using fpdf in php
I am not getting while clicking on image my code $pdf->Image('logo.png',10,20,33,0,' ','http://www.fpdf.org/'); working but I want to display the local file. Mean click on image it will go the the …
The End.