I'm trying to add user submitted articles to my website, (only for admins). With each article comes an option to upload up to 3 images. My database is set up like this
Articles
id
user_id
title
body
date_added
last_edited
Photos
id (auto_increment)
article_id
First I save the article in the database, then I upload the photo (tempo...
Ok, so here's the quick rundown. I have a function to generate the page numbers.
This:
<?php
die($ani->e->tmpl->pages("/archive", 1, 15, 1, true));
?>
will output Single Page like expected.
But this:
<?php
$page_numbers = $ani->e->tmpl->pages("/archive", 1, 15, 1, true);
?>
<?= $page_numbers ?>
will output a simple 1 to the page....
my scrip is supposed to look up contacts in a table and present thm on the screen to then be edited. however this is not this case. I am getting the error
Parse error: syntax error, unexpected $end in /home/admin/domains/domain.com.au/public_html/pick_modcontact.php on line 50 NOTE: this is the last line in this script.
<?
session_star...
Hi, im currently getting these error on my site:
Warning: array_keys() [function.array-keys]: The first argument should be an array on line 43
Warning: Invalid argument supplied for foreach() on line 44
Warning: array_diff() [function.array-diff]: Argument #1 is not an array on line 47
Warning: array_diff() [function.array-diff]: Arg...
The standard HTTP Authentication for SOAP passed the password etc in cleartext,and I'm looking for an alternative, possibly a key based mechanism to authenticate web services in lieu of the password.
OAuth is gaining a lot of popularity; would it be appropriate, and how would I implement it? Or perhaps there are other methods I should u...
I need to pass a variable number of strings to instantiate different classes. I can always do a switch on the size of the array:
switch(count($a)) {
case 1:
new Class(${$a[0]});
break;
case 2:
new Class(${$a[0]}, ${$a[1]});
break;
etc...
There has to be a better way to do this. If I have an array of strings ("variabl...
How to html report to any printable file.Is there any solution.
...
People,
I have been struggling over the two methods -
Update Profile Image and Update Background Image
I am using EpiTwitter library.
I am uploading GIFs, Twitter returns the expected result for
update_profile_background_image but returns 401 for
update_profile_image
, but the image is not changed.
Here are the headers catched from $...
i have tested several UML applications for whether they could show composition relationships in the UML diagrams generated form the PHP source code or not, and the result is they can't.
i know that this is a typical problem for PHP cause we don't declare a data type when we code, so it's difficult for the UML applications to know if an ...
I wanted to know how suitable is Drupal for making a sports betting website similar to http://www.sportsinteraction.com/ . I am aware that there are modules like Bookmaker in Drupal which could help . However, I am puzzled about how to handle the user accounts can be extended to keep a track of the money in each individual account.
Also...
How can i call a web service from php
...
Hey,
im using a connection to a server in my php script, opened with fsockopen() and i want it to share between different pages so i serialized it and saved it in a session variable but it seems that that ia a bad idea because when i do this nothing happens...
Not even an error.
The problem is that this connection requires a handshake so...
I want to create a browser based game and I have a huge problem, the game can be easily hacked. The problem is at a page where you can go to "work", I store in a file the work ending date and the amount of money what you will receive after finishing the work. There are 4 type of works. The problem is that I use ajax to send to a php file...
I am creating a web app that accepts input of news items (title, article, url). It has a page news.php which creates a summary of all news items inputted for specified dates, like so:
News
4/25/2010
Title 1
[URL 1]
Article 1
Title 2
[URL 2]
Article 2
and so on...
I have two other pages, namely preview.php and send.php , both of whi...
Is there any way to create a HmacSHA256 signature of a string in php?
...
Is it possible to send an email to multiple recipients, but on the receiving end, the recipient will only see his/her email address? If so how do I do this and could you point me to some references?
I know this can be done via a loop that sends to each recipient separately. But then I'll have to consider other things as well, such as 1)...
hi, i am a little new to php and although i have managed to pass values of session variables before this piece of code is leaving me puzzled
<form action="team_reg2.php" method="post" name="form1" class="cent" id="form1">
<p><strong>Team Registration</strong></p>
<?php
$con=mysql_connect("localhost","root","");
mysql_select_db("...
Hello all,
I've developed a small framework that was needed for the firm that I work. The problem is I've not made a full level framework, as developers are finding tough time to understand what is what, So I made a simple structure with
app/controllers,
app/models,
app/views
so that they can clearly separate the code and can get us...
Forgive me for this noob question, but is there such a setting that sets a certain amount of time (e.g. milli/seconds) that has to pass in between sending emails through a script? How is that setting called and where do I change that setting?
I'll give an example:
I used to have a PHP script that sends emails like so:
for ($i=0; $i<co...
So, I want to create car racing for my RPG game's players. Player can create race and choose how many participants can participate in race. After race is being created, other people can join it. When the maximum participants are collected, race begins.
My idea, when the last participant joins, then instantly choose the winner (who's ca...