So I have a form that I post to a page and in the form I'm posting certain variables that I build one of my queries with and then call them on my page. How can I post data and also build a query and display the answer on one call?
Maybe I'm not wording it right and I'm learning this stuff, but I just don't know. Should I post to an in...
hi i need to populate a drop down list when i select a certain value ,
and the options need to be queried from the database ..
can i achieve this from jquery ?
if i can then please i would appreciate any help..
...
For some time i am battling to solve this problem but iam not coming to any conclusion so thought to seek some help here.
The problem is that i am getting a blank dropdown instead i should get list of cities populated from the database. Database connection is fine but iam not getting anything in my dropdown.
This is what iam doing:
...
What's the PHP code that would do one thing first and then take that and do a second.
1st: I want $_GET a variable and then run a query on it and return variables.
AND THEN
2nd: Use those "other" variables in a query.
I'm thinking I want to do this with two functions b/c my query is based off of what values I send from a form. So it...
I would like to write a PHP function that calls another function
Page 1.
User selects item from drop down.
(I then post to the same page.)
Page 1.
(I have a query on the page that's based off of which item is selected)
(In this case I'm returning the lat and long of the item.)
$latitude = $row_farms['lat'];
$longitude = $row_farms['...
I have an array like so:
Array
(
[level] => Array
(
[0] => Array
(
[lvlName] => name
[lvlEnt] => ent
)
)
[title] => Array
(
[0] => Array
(
[title] => a title
...
Hi All
I am designing intranet system for medium business. Should i keep single log table for all modules or make it separate ? Audit log keeps all admin/staff activities(create, update, delete objects) and the log structure is universal for any kind of module. And also is it good idea if i pull report based on log records ? My log tabl...
Hello!
I would like to split a text into single words using PHP. Do you have any idea how to achieve this?
My approach:
function tokenizer($text) {
$text = trim(strtolower($text));
$punctuation = '/[^a-z0-9äöüß-]/';
$result = preg_split($punctuation, $text, -1, PREG_SPLIT_NO_EMPTY);
for ($i = 0; $i < count($result); $i...
Is there any trick to run .PHP files in windows XP from any folder by double clicking like HTML file ?
I use XAMPP but in this we need to put files ina special htdocs folder. I want to run file from any folder, desktop by double clicking.
...
I'm working on a PHP upload script which allows .mp3 file uploads amongst others. I've created an array which specifies permitted filetypes, including mp3s, and set a maximum upload limit of 500MB:
// define a constant for the maximum upload size
define ('MAX_FILE_SIZE', 5120000);
// create an array of permitted MIME types
$permitted =...
I've been trying to make an ajax request to an external server.
I've learned so far that I need to use getJSON to do this because of security reasons ?
Now, I can't seem to make a simple call to an external page.
I've tried to simplify it down as much as I can but it's still not working.
I have 2 files, test.html & test.php
my test.htm...
Very basic, but would like to know the difference/security ramifications etc of using " vs. '.
Can someone provide an example that explains when to use each one?
...
Hi there
I'm just curious. Do you know any tool which can count all the code lines from a PHP project?
Many thx!
...
I used this guide on Apple's website to enable PHP on my computer but I lost all my Apache configuration files in process. I ran this script which I found on Google to restore Apache on Mac OS X:
#!/bin/sh
# run with ./apache_refresh.sh
#If permissions error do: chmod u+x filename.sh
#WARNING THIS MAY DELETE OR CHANGE YOUR APACHE SETTIN...
When someone types in the following to be put into a database:
Hello,
My name is John and I am 22, and looking for a good time.
My Phone Number is:
555-NOT-REAL
Sincerely,
John D.
I want the break lines to stay there, but it seems that when I pull the value back out it comes out as follows.
Hello, My name is John and I am 22, and ...
I am starting to use the jquery $.ajax() but I can't get back what I want to...I send this:
$(function(){
$.ajax({
url: "graph_data.php",
type: "POST",
data: "casi=56&nada=48&nuevo=98&perfecto=100&vales=50&apenas=70&yeah=60",
dataType: "json",
error:
function (xhr, desc, exceptionobj) {
...
I am working on a project has me constantly pinging a php script for new data, so if I understand this correctly that means that the php script being pinged gets run over and over indefinitely. It works but i'm guessing its a huge strain on the server, and is probably considered ugly and bad practice. Am I right about that?
Is there any...
I am trying to track what users are searching for on my site (from a simple search form on the front page) with PHP and MySQL.
At the end of all my queries I am using this query:
INSERT INTO `DiggerActivity_Searches` (
`SearchTerms`,
`SearchType`,
`NumResults`,
`Location`,
`Date`,
`Time`
) VALUES (
'SearchKeywords',
'SearchTypes',
'Num...
Hi there;
The company has a web-based punch card application, but my boss wants to make employees punch in and out using their fingerprint rather than sharable passwords. Is there any free/open source/commercial SDKs that can be used? With a Java or ActiveX based embeddable component?
Thanks in advance.
...
I'm trying to pass this to a PHP script through AJAX:
var answers={};
for (x=0; x< allAnswers.length; x++)
{
answers.x=new Array();
answers.x['id']==allAnswers[x]['id'];
answers.x['val']=$("#field_" + x).val();
}
var data={};
data.id=questions[qId]['id'];
data['answers']=answers;
$.post('inde...