Hi,
I've seen and read plenty of blog posts and forum topics talking about and giving examples of Data Mapper / Model implementations in PHP, but I've not seen any that also deal with saving files/images.
I'm currently working on a Zend Framework based project and I'm doing some image manipulation in the model (which is being passed a ...
Hi,
with html forms we can upload a file from a client to a server with enctype="multipart/form-data", input type="file" and so on.
Is there a way to have a file already ON the server and transfer it to another server the same way?
Thanks for hints.
// WoW! This is the fastest question answering page i have ever seen!!
...
i have some fields in my database table,and a field with phone name , i save value to this filed like this 111-222-5555
now i want to read all of my fields , and populate to my form , i like populate phone filed to 3 elements(as text element)
when i try this code
$id = $this->_request->getParam ( 'id' );
$values = $cutomModel->findC...
Edit: (here is a better live example:
http://vzio.com/upload/reg_pattern.php)
I am very bad at regular expressions, but I have a regular expression that is working okay, except for one issue:
/\/(.*?).php/
I only need this regular expression to find things like:
/this-a-valid-page.php {some words here} /anotherpage.php { some w...
Hi all and thanks in advance to all for this
I tired and was unable to find the answer i am looking for an answer. my problem is that i am unable to update the values enterd in the form. I have attached all the files i'm using MYSQL database to fetch data.
what happens is that i'm able to add and delete records from form using ajax an...
I've got 80,000 users on my site and i've recently turned away from the forum script i've been using and built something very simple myself that works just as well (the forum script was too bloated and resource intensive for my simple site)
The only thing i've lost is the ability to mass email all my members.
So i'm looking to come up ...
Hello
Under my debian copy, I run a django site runs via apache2 and mod_wsgi. Now I want to include a wordpress to it, for that I need to install php - apache bindings. I am curious what library is recommended for this, aswell as how shall I be doing the apache2 config file ?
Here is my current apache 2 000-default file:
<VirtualHost ...
When i am trying to download a file whose name has characters from languages like chinese japanese etc...... non ascii... the downloaded file name is garbled. How to rectify it.
I have tried to put charset=UTF-8 in the Content-type header property, but no success. Please help. Code below.
header("Cache-Control: ");// leave blank to avo...
Introduction:
I want to loop through XML files with flexible categories structure.
Problem:
I don't know to loop through a theoretical infinte subcategories without having to make x amount of "for each" statements (See coding example in the bottom). How do I dynamically traverse the categories structure?
<?xml version="1.0" encoding=...
In the end, I got this function. I don't know whether it's normal or not.
function user_registration($user_name, $user_email , $user_pass , $address ,
$city , $postalcode , $country , $phone , $mobilephone)
How and why can I improve this?
...
this question is like this one, except it's for PHP testing via browser. It's about testing your form input.
Right now, i have a form on a single page. It has 12 input boxes. Every time i test the form, i have write those 12 input boxes in my browser.
i know it's not a specific coding question. This question is more about how to do di...
i'm trying to learn php/mysql.
inserting data into mysql works fine but inserting those with apostrophe is generating an error. i tried using mysql_real_escape_string, yet this doesn't work.
would appreciate any help.
<?php
include 'config.php';
echo "Connected <br />";
$auth = $_POST['author'];
$quo = $_POST['quote'];
$author...
Hi ,
i am doing one small application , wheich have login functionality,
in the user table am maintaining the AVAILABLE status for the logged USER,
example :
i have three user called foo1,foo2,foo3 ,
When foo1 logged then his AVAILABLE STATUS WILL UPDATE AS 1 IN THE USERTABLE, if he logged out then his AVAILABLE STATUS goes to 0,
...
So I have a file for constants. I want to let user define them and then edit my .php filr with that global constants (not xml - real PHP file )
With such code for example
<?php
// Database Constants
define("DB_SERVER", "localhost");
define("DB_USER", "root");
define("DB_PASS", "000000");
define("DB_NAME", "cms");
?>
How to edit this...
My custom WP theme has a text block in the theme options panel that allows the user to create and maintain a custom css block that is applied to the site template at runtime.
I would like to trim or "minify" this content before its stored in the database, but retain all the whitespace when its presented back to the user for editing.
Wo...
Hi,
I try to use the SQL statement
SELECT * FROM table ORDER BY column
via an PDO-Object in PHP. Problem is, that I always get an error (Call to a member function fetchall() on a non-object - that means, the query did not return a PDO-object) when using the names of all columnname EXCEPT for ID. When I query
SELECT * FROM table ORDE...
PHP file that should run once with no errors and delete itself. Is it possible? How to create such file?
...
Hi am trying to post some data on a website using CURL. The posting process has 3 steps.
1. enter a URL, submit and get to the 2nd step with some fields already completed
2. submit again, after you entered some more data and preview the form.
3. submit the final data.
The problem is that after the second step, the form data looks like ...
So I have a database with a few tables.
The first table contains the user ID, first name and last name.
The second table contains the user ID, interest ID, and interest rating.
There is another table that has all of the interest ID's.
For every interest ID (even when new ones are added), I need to make sure that each user has an entr...
All over the Internet, included even here at StackOverlow, people state that a good way to check if a request is AJAX or not is to do the following:
if (strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' ) {...}
However, I don't see $_SERVER['HTTP_X_REQUESTED_WITH'] in the official PHP documentation
And when I try to d...