I only know how to get POST values via named elements, such as:
<?php
$value = $_POST['value'];
But that would require naming my form elements, which does not validate.
The invalid code would look something like this:
<form id="myForm" method="post" action="#">
<input type="text" name="text" />
...
This PHP code below will take an image and add the word _thumb in between the filename and file extension
This file is called up to 50 times on some pages to show user photo, please not I only linked to a full path image on another server for this example, the file path is usually pulled from a Mysql DB that stores the path to a users ...
I'm currently working on a little chat/forum site that I roughed out in a weekend, and it has anonymous entries (i.e.: no usernames or passwords). This looks like it could be easy-cake for a spammer to ruin, but I don't want to bother the user with captchas or similar anti-spam inputs.
Are there any invisible-to-the-user alternatives t...
How does Propel determine which database to use for command-line tools (ex. "propel:build-all")? I'm setting up two environments (production and staging), and the databases will be different for each.
Is it "propel.ini" or "databases.yml"? If the former, does symfony auto-generate that file?
I would greatly appreciate any help. Thank y...
I have a simple one text input form that when submitted, needs to fetch a php file (passing the inputs to the file) and then take the result (just a line of text) and place it in a div and fade that div into view.
here is what i have now
<form id=create method=POST action=create.php>
<input type=text name=url>
<input type="submit" valu...
i can upload a file in the database using sql but how can i make a download link for it? like when you download something online then a message box will come up you will be asked if you would like to open it with a program or save it. how can i do that in php? can you give me the codes for it? i'm still a noob.
...
Anyone know of any documentation that would help me with trying to embed a web browser component into adobe flex.
I've seen in Adobe Air that there is a Item; however, in Adobe Flex 3 for a .swf file that would be somewhere - I do not see it.
Any ideas?
...
By functions file I'm referring to a file that is called for in each PHP page and contains functions. I noticed another question asking about function files and it reminded me that my PHP website did not use any function file. So I'm just wondering if function files are recommended for sites.
...
Hi,
I'm using Memcached PHP library (based on libmemcached) and I'm wondering how can I change predefined constants in PHP. I'd like to use key distribution based on ketama.
Memcached is compiled as a PHP extension.
Thank you.
...
// Get the image information and display the image:
if ($image = @getimagesize ("../uploads/$pid")) {
echo "<div align=\"center\"><img src=\"show_image.php?image=$pid&name=" . urlencode($row['image_name']) . "\" $image[3] alt=\"{$row['print_name']}\" /></div>\n";
} else {
echo "<div align=\"center\">No image available.</div>\n";
...
If I return nothing explicitly, what does a php function exactly return?
function foo() {}
What type is it?
What value is it?
How do I test for it exactly with === ?
Did this change from php4 to php5?
Is there a difference between function foo() {} and function foo() { return; }
(I am not asking how to test it like if (foo() !=0) ....
Say I have an $input array, that contains something like this :
array
0 => string 'a' (length=1)
1 => string 'b' (length=1)
2 => string 'c' (length=1)
3 => string 'd' (length=1)
4 => string 'e' (length=1)
5 => string 'f' (length=1)
6 => string 'g' (length=1)
7 => string 'h' (length=1)
8 => string 'i' (length=1)
9 => ...
Hi,
is there anyone who knows how to install / configure php under apache?
I have emerge php apache both.
I wanted to use mod_php for apache in GENTOO OS.
php temp.php
command line runs fine, but http://localhost/temp.php is not executing on web server instead it shows the content of the php code.
...
I am working on a small PHP website. I need a MySql database access class that is easy to configure and work with.
Does not need to be a full framework, I only need a max. few classes.
...
Hi there,
I'm storing a timestamp in a mysql table every time somebody visits the site for the first time.
I wind up with data that looks like this:
2009-08-02 04:08:27
2009-08-02 04:07:47
2009-08-02 05:58:13
2009-08-02 06:28:23
2009-08-02 06:34:22
2009-08-02 08:23:21
2009-08-02 09:38:56
What Im wanting to do with this data is creat...
Hello guys,
I'd like to use a resizing script for my images (Timthumb). I'm trying to pull from the database the first image contained in a post, and add to it the path to the script, as well as some extra instructions :
<?php
$content = $post->post_content;
preg_match_all('/src=\"https?:\/\/[\S\w]+\"/i', $content, $matches, PREG_...
What is an efficient way to display a list with unread posts in a forum?
It is possible to track the user and logging each post he or she visits and registering it in a new table.
I think this is not very efficient. What is a more efficient way to do this?
...
I have installed different versions of PHP and MySQL on wampserver for testing purposes. However, phpMyAdmin gives a warning that:
"Your PHP MySQL library version 5.0.51a differs from your MySQL server version 5.1.36. This may cause unpredictable behavior."
Is this going to cause problems?? If yes, what should be done?
I am not able to...
Is there an easy way to INSERT an row when not exists, or to UPDATE if it exists, using one MySQL query?
...
I have a script that takes a key from $_GET['key'] , looks up the location in a database and uses the readfile together with some headers to present a download for the use. This works in Firefox but not IE8, haven't been able to test it on another IE. I get the following error in IE: "Internet Explorer cannot download download.php from w...