Hi
I have the following problem with listing data from DB. Suppose we have table
"client" in DB with fields:
id_client
username
password
last_login
query is:
SELECT username,password,last_login FROM client ORDER BY id_client LIMIT 20,20
Normal procedural listing of clients would be:
/* connect to DB using mysqli */
if ($result...
The string input comes from textarea where users are supposed to enter every single item on a new line.
When processing the form, it is easy to explode the textarea input into an array of single items like this:
$arr = explode("\n", $textareaInput);
It works fine but I am worried about it not working correctly in different systems (I...
Hello all,
I have just realised if I add a particular record to my MySQL database - it will have a date/time of the server and not the particular user and where they are located which means my search function by date is useless! As they will not be able to search by when they have added it in their timezone rather when it was added in t...
hey i got 9 type on my web. i have to set different keywords each type. with this script;
if ($type = movie) {
$yazdir = "DVDRip, DVDScr";
}
elseif ($type = game) {
$yazdir = "Full Version, Patch";
}
i can write keywords for two type. how to repeat this correctly for other types? (echo paramether must be $yazdir)
...
Hello!
I want to do a search with pagination, but I don't know how to 'store' the data in the $_POST array, should I do it with sessions?
Rolensen
...
I'm building a chat application with codeigniter and doctrine.
Tables:
- User
- User_roles
- User_available
Relations:
ONE user have MANY roles.
ONE user_available have ONE user.
Users available for chatting will be in the user_available table.
Problem:
I need to get all users in in user_available that hasn't got role_id 7.
So I ...
I tried php gettext in my localhost and everything worked, but when I uploaded the files to my hosting it said the following:
Warning: putenv(): Safe Mode warning: Cannot set environment variable 'LC_ALL' - it's not in the allowed list in /www/zxq.net/w/e/e/weedcl/htdocs/localization.php on line 4 Fatal error: Call to undefined function...
How can javascript pass data, for example from an HTML table, without using AJAX?
I am lacking the understanding of how to actually pull data, format (into json likely), and pass it.
I am trying to pass data to a php function that sends a file to the user to download. (something ajax can't handle as I understand it)
EDIT - please give...
I'd love to see some code here rather than enjoy some sourse outside. =)
...
How do I make an application form in PHP that sends an e-mail using the mail() function?
...
As I add methods to various DB_DataObject classes, I lean towards
Class Example extends DB_DataObject {
function methodx() //start fresh
{
$newObject = DB_DataObject::factory($this->__table);
/* do stuff with $newObject */
}
rather than
function methodx() //use current instance
{
/* do stuff with $this */
}
I've realize...
The problem is that I want to check if the file is too large to upload so that I can display a relevant error message, but when the file is larger than upload_max_filesize in php.ini it seems to be only displaying a 0.
Why is this happening? How can I test that the file is too large to give a relevant error?
...
Hello all,
I have a question that has me stumped, maybe you can help. I have the following php:
if(mysql_num_rows($result) > 0){
//if so set up the xml
$dom = new DOMDocument();
$response = $dom->createElement('response');
$encore = $dom->createElement('encoreSongs');
$dom->appendChild($response);
$previousDate = "";
...
I'm using Zymic, its a great hosting but it doesn't support the php gettext extension. I'm planning to buy some hosting in the future, but from now I want the simplest solution in order to replace the function of gettext, in this case I want to display different text (English, Spanish, Chinese, etc...) without modyfing the file too much ...
I am currently trying to figure out how to connect to another server via SSH using PHP's shell functions. I have a site where I have to pass data from PHP to a custom command line program, then return the output. On the old server I was using, this was possible via the exec() function:
$cmd = '/path/to/custom/program "arg1", "arg2", "ar...
How can i get the blogid from a given blogspot.com url?
I looked at the source code of the webpage from a blogspot.com it looks like this
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.blogger.com/rsd.g?blogID=4899870735344410268" />
how can i parse this to get the number 4899870735344410268
...
I am looking for a good (stable enough, intuitive enough, and the more technologically modern and advanced - the better) free PHP-based online groupware/collaboration system. 100% UTF-8 is a requirement. OOP-style code is an advantage. And collaborative mindmapping would be a cool feature to have. The team is of ~20 people. Any suggestio...
I'm not talking about JSON. I've got a program with the input being a javascript data structure in string format, something like this:
$string = "
var records = new Array();
records[0] = new Record('data1','data2',data3');
records[1] = new Record('data1','data2',data3');
records[2] = new Record('data1','data2',data3');";
Is there an e...
So I have two tables: X and Y.
The schema.yml looks like:
X:
columns:
something: { type: string(255), notnull: true }
y_id: { type: integer, notnull: true }
relations:
Y: { onDelete: CASCADE, local: y_id, foreign: id, foreignAlias: xs }
Y:
columns:
something: { type: string(255), notnull: true }
And in my XTabl...
I have been tasked with rewriting a .NET application which communicates using a WSE Proxy to PHP.
There is one thing I'm grappling with. I see the code
UsernameToken userNameToken1 = new UsernameToken(sToken_UserName, sToken_Password, PasswordOption.SendPlainText);
Which, I assume, adds a security header to the SOAP envelope. I am not ...