I have a website which processes orders from a Windows application. This works as follows:
User clicks "Order now" in the windows app
App uploads a file with POST to a PHP script
The script immediately calls the PHP mail() function (order is not stored in a db)
This works fine most of the time. However, sometimes a big delay occurs (...
Hi all,
So I have a primary key column called key. I'm trying to select the row with key = 1 via this code:
$query ="SELECT * FROM Bowlers WHERE key = '1'";
$result = mysql_query($query) or die(mysql_error());
For some reason, I'm getting this result:
You have an error in your SQL syntax; check the manual that corresponds to your...
Hi! I'm writing a little website (webapp) in php+codeigniter, I'd really like to make it open source (to attract collaborators and to have a free VCS hosting).
Is that a good practice?
This mine security?
Which are the best tools to change important data before uploading? (like config files with db names and passwords used for testing ...
Well, I know there is a funciton mysql_fetch_array() and we can use it like this:
while ($row = mysql_fetch_array($result)) {
echo $row['name'] . "<br />";
}
But is there any other way? For example, if there is only one element that can be returned, and not an array.
Thanks)
...
I want to make a news portal(php) with minimum mysql force.
:create a cron, fetch data from mysql and write to a php file . (I dont know is it right way)
But Can I use xml instead of php file? Write mysql data to xml.
Is this a secure way? What is the best way? XML or php file?
Thanks in advance
...
Due to some help from a recent post, I'm selecting a row by primary key, as follows:
$query ="SELECT * FROM Bowlers WHERE 'key' = '1'";
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_assoc($result)or die(mysql_error());
For some reason, the third line of code dies every time, without error. It works fine usin...
I want to get an array composed of the first 4 rows of the original array $arr,
how to do it in PHP?
...
I fetched the tweets from twitter api using yahoo pipes.
Now, twitter gives the time in this format "Thu May 27 19:56:21 +0000 2010".
I want to know how many minutes have past since "Thu May 27 19:56:21 +0000 2010".
How, can i format "Thu May 27 19:56:21 +0000 2010" in order to get the minutes past?? in other words, i want to subract "no...
I've a SOAP response in a var $soap_response like this:
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap...
I'm troubleshooting a prepared statement but I'm getting nowhere. I think this is because PDO is not generating an error.
I've called:
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
And am trying to get it to insert as follows:
$stmt = $db->prepare23423("INSERT INTO ".DB_TABLE_PREFIX."quote (email,reference,started) VA...
Can any one please let me explain step by step implementation for LDAP on my site using PHP
...
Hello, everyone i want to get apache version. Actualy i want to use setenv() function in php file . but i m not able to use that its throughing an error undefined call to a function setenv() . it might b because of my apache version.Please suggest
Thanks & Regards
Shri.
...
$.ajax({ type: "POST", url: "OMFG.php", data: info, success: function(){ }});
is what I'm using atm as a test and it works fine.
I need to get the url from the link I'm clicking, so I do:
var url = $(this).attr("href");
which works fine if I alert it out(the link includes http://samedomain.com/etc.php), but the ajax function doesn...
Hi,
I want to post values to a page through a hyperlink in another page. Is it possible to do that?
Let's say I have a page results.php which has the starting line,
<?php
if(isset($_POST['posted_value']))
{
echo "expected value";
// do something with the data
}
else
{
echo "no the value expected";
}
If from another page say link....
<a onclick="run('Hi, Tim! I&#039;ve got two', '">test</a>
The onclick event is not run at all.
The above is generated by something like this:
<a onclick="run(<?php echo htmlentities($str) ?>)">test</a>
How to fix it?
...
hey
guys i need to count new private messages and old one from a table
so first thing come to mind is using mysql_num_rows and easy thing to do
// check new pms
$user_id = $userinfo['user_id'];
$sql = "SELECT author_id FROM bb3privmsgs_to WHERE user_id='$user_id' AND (pm_new='1' OR pm_unread='1')";
$result = $db->sql_qu...
I'm having trouble when sending emails thorough the mail() function.
I have a script that works perfectly fine for an email address like [email protected] but when the first part of the email is something with a dot like [email protected] it doesn't work and returns this error :
Warning: mail() [function.mail ]: SMTP server respon...
Hello.
I have a slight problem and cannot for the life of me figure out what is happening. I am running a Linux machine on a server with APC enabled. Everything works fine.
Now when I enable APC on Windows the server starts terminating the connection. You know, the "Site currently unavailable" message Firefox spits out.
I tried the ac...
hai all,
i am working on shopping cart project, i need globalpay integration . i got the sample code and run in my localhost it shows me error this.
Warning: SoapClient::__construct() [function.SoapClient---construct]: SSL: fatal protocol error in C:\wamp\www\exampls\PHP Web Service Sample (Credit Card) 4.0.0\PHP Web Service Sample ...
I installed the new Like plugin on my Wordpress blog. I also have the Open Graph Plugin for Wordpress installed.
It all works magically except that the HTML special characters are showing on my Facebook Wall when I click like.
I tried preventing the Open Graph plugin from encoding the content of the mega tag in the first place by editi...