hello everybody,
i wanna build a database-wide unique id. that unique id should be one field of every row in every table of that database. i have different ideas on how to achieve this, and really like to know whats your opinion...
First idea is to create one master-table with an auto-increment-field and a trigger in every other table,...
I tried:
$test = include 'test.php';
But that just included the file normally
...
hi i work a lot in mixed html and php and most time i just want solid html with a fet php variables in it so my code look like this
<tr><td> <input type="hidden" name="type" value="<?php echo $var; ?>" ></td></tr>
wich is quite crap isnt there little code something like:
<tr><td> <input type="hidden" name="type" value="$$var" ></td><...
Hi, I'm working with PDO connection for mysql and I'd like to have some opinion on a query I use to check if tags are present on the database, and to add it in the case it isn't.
// the tags are allready processed in $tags array
$check_stmt = $connection->prepare ("SELECT * FROM tags WHERE tag_name = :tag_name");
$save_stmt = $connect...
Brief background - Im writing a special import manager to be run via cron. The basic operation is:
Delete all records from table
Load data from a file or a string into the table
Not to difficult, however because of the apocolyptic delete at the beginning of this sequence id like to use a transaction so i can rollback if anything goes...
Hello guys.
I can't use Xdebug to debug a application built with Code Igniter, but i can use it to debug any other PHP file as long it doesn't use the same Structure for url solving that Code Igniter uses.
Meaning: In a simple PHP file with no Code Igniter, when i use NetBeans debugging the browser goes to: http://localhost:86/index.ph...
Hi,
I'm having a problem with cURL. I am downloading images and saving them to a folder. The file that cURL creates has the right filesize, which makes me think that the headers are being read properly. But, when I open the file up in my browser or in any picture-viewing application, only a tiny bit at the top appears to actually hav...
Hello,
I am having some problems with null values
Is there a good way of passing the null values from js in a way that they are interpreted the same.
This apparently is not the same
ajaxNullVar = null;
post_var = {'action': 'update_foto','fotoid': fotoid, 'ajaxNullVar': ajaxNullVar };
$.ajax({
url: post_url,
...
Hi all,
I'm building a CMS on a SaaS principle. I have my webserver (dynamic dedicated) up and running. It's all going like expected, but now I've come across my templating system, and later on simple things such as filehandling. Logically, each client has an own hostingaccount. All the hostingaccounts will be requesting to the masterda...
I'm trying to make a multi file uploader.
I'm using "Multiple File Upload Magic With Unobtrusive Javascript"
None of the files upload. I'm pretty sure this is because it's putting the files into a array and I don't have my php set to handle the array (which I don't know how to do). Any help on what I'm doing wrong?
Thanks in advance! :...
I'm a huge fan of Markdown (using it in nearly all of my PHP projects) but not a fan of its limited output. Much of the rendering is a bit too simple, and doesn't really allow me much control or freedom regardings its layout. For instance, I can insert an image:

This is my image!
But that will simply be...
I'm familiar with the basic of CLI and $argv array with php.
Example:
<?php // test.php
var_dump($argv);
?>
$php test.php datafile.txt 10 100
will produce:
array(4) {
[0]=>
string(8) "test.php"
[1]=>
string(12) "datafile.txt"
[2]=>
string(2) "10"
[3]=>
string(3) "100"
}
What I'm trying to do is pass all files...
I have a script on my server for uploading file. It is working fine before but suddenly it cannot upload files to the server. I did not change the code, I did not change anything related to php setting or directories permission also for the server. I did not change any thing in the webserver (apache). I created a small script to isolate ...
My own answer to this question is YES, but I'd like to hear from others. Put another way the question could be: Would the success of 1-click-install WordPress (not WordPress.com, which is SaaS) be possible if it weren't written in PHP, all other things being equal?
The critical associated requirements I believe support PHP are:
hosti...
I want to save tags related to a discussion post. The same as the 'tags' that Stack Overflow uses. What is the best way to do this?
I was thinking of saving them in the 'discussion' table as a single comma separated string, but I'm not sure if this is the 'fastest' way assuming there will be lots and lots of rows in the discussion tab...
I am making nodes programmatically. One node field is a nid reference to a node of type Meet. I have set these attributes to a real node of type Meet. However, when I run this node object through node_validate(), I get an error:
Meet: this post can't be referenced.
Why does this happen? Here is the node object:
stdClass Object
(
...
I am trying to write a script (in PHP) that find a domain age (creation date and maybe if possible, last update and expiration date as well). I want the script to return something like: 2009,2009,2010
if creation date is 2009, update date is 2009, and expiration is 2010 (an array)
help?
(This is NOT a homework question so please provid...
Hi,
I've recently moved my development from linux to windows 7 with the purchase of a new laptop. I have noticed that there are some problems, with my once working Lucene searches.
My Searches are not returning results that they were when running on linux, and there are some issues with other code, which I am working through debugging....
Hello, I've made a voting on comments like the one this website has(something similar), and I'm slightly concerned about possible http request misuse. You'll know what I mean after I show you the questionable code:
$.ajax({
type: 'POST',
url: 'http://localhost/comments/vote_down/' + post_id
});
Now its still on localhost but it wi...
I'm using a regular expression to turn URLs in blog comments into clickable hyperlinks. However, i also want to do the opposite:
Since i allow certain html tags (but not <a>), if somebody types in a hyperlink, i'd like to change it from:
<a href="http://www.example.com">My Link</a>
into
My Link: http://www.example.com
where the ...