I had an image upload script that worked on my little shared hosting, but just as I switched to Virt Ded, it immediately stopped working. After some research I determined the culprit to be the PHP function imagejpeg() - which was the last bit of code in the script.
It allows me to specify null as the filepath (in which case it prints it...
I am using sandbox mode.
I click buy item on my shop, and after i pay with sanndbox account it takes me to "Thank you for your payment - Paypal" but doesn't redirect back to my site! I already have IPN setup!
I dont understand, do I need to contact paypal first ? or is there some section on paypal where you can enter your shopping sit...
Below is a PHP array I have, it has Countries list 1 to 228 with name and a number for that country. I used this on an old project where in the mysql DB I saved a user's country as a number and then I could use this array to avoid doing another mysql query on pages.
Now I am doing a different site where performace is important. W...
Hey guys, im building a small product catalog for a client. I am currently trying to figure out how to go about allowing the user to sort by "popularity". I figured the easiest/simplest way to do this would be by having a "views" field in each product record.
Originally I didn't think this through (duh) and thought I would just add on...
Question edited to better reflect my needs.
Take the following example:
class Base
{
public $Text = null;
public function __construct()
{
$this->Text = new Base_Text();
}
}
class Base_Text extends Base
{
public $Is = null;
public function __construct()
{
$this->Is = new Base_Text_Is();
...
I have a small email confirmation form. I was testing it and everytime I enter my email and go to verify it, it's in the spam box. I have tested it with multiple accounts and getting complaints about this issue as well.
When I login to my domain's mailbox and send emails to my users, they go straight to the inbox....
what is wrong with...
I'm trying to retrieve link text from an HTML file. Each of the link have a specific class applied to them, but the urls are different.
I have the following:
...
<a class="fetch-me" href="products/1">Find ME!!!</a>
...
<a class="fetch-me" href="products/2">Me too!</a>
...
I am using the following PHP code, but always getting more th...
I have three SQL Server databases on one SQL Server instance. Every time I do query to different databases, I have to select the database.
Is there a way to do query without database select. Like this:
SELECT * FROM database_name.table_name WHERE id = 1
...
<?php
$to = '[email protected]';
$from = '[email protected]';
$message = 'blah blah blah';
$subject = 'yadda yadda yadda';
mail($to, $message, $subject, "From: $from", "-f$from");
I am on a dedicated linux machine. I have a named based virtual host setup on apache2. i have 2 domains running on the same ip.
Anyway I can edit options or some...
Its a simple problem but I think i am stuck..I need to get the array's elements to be displayed in a tree format in php.. the array elements will be fetched from the database..
...
I'am having a select option box,if i click on the select option,two other text below it should be loaded with data from database,based on select option id value.How to do this with
php and jquery or cakephp and jquery
thanks in advance
...
Can I store a special character inside a variable?
I mean something like:
<?php
$variable=' '
Then can i use something like echo $variable?
...
I'm aware that serializing is used to
convert data types into a storable
format, for purposes such as caching.
What I'm more specifically asking is, what are the circumstances in which you should actually decide to store data ( using serialize() in PHP, pickle module in Python, et cetera )?
Let's say we had a high traffic websi...
I'm developing a script that will allow people to generate a banner for them to use. It's customizable. During the customization process, I'd like to be able to have the banner reload on the spot. So they could see the changes. Once they create the banner and are completely done with it I would give them a link for them to use. This link...
Is it possible to omit certain variables from serialization? Say I have a temporary variable in a php object that I don't want serialized as it is a waste of space. The only thing I can think of is making them static but this is not ideal as it is not really part of the object which there will be many instances of.
This may not even be ...
I have a "student" table, having around 5,000 records, in my DB. I want to display those records in two divs. How do I do that without executing the query twice; only using a single query?
...
Because I thought of ajax posting my form to a specific function in my controller and do a sql-insert, but I want to stay on the same page. So is it necessary to load a view in the posted url (=destination)?
...
how can I setup httpd.conf so that I can pipe all requests to that port go to a php file?
I am trying to make a socket connection from action script to localhost in flash.
...
I'm starting a experimental project and I was looking for advice to choose the best option I have.
The project will be on the 100 - 1,000 user count. It collects its main data using javascript + json data from the user's flickr page and then uses that to display specific flickr photos. The variables that need to be stored include use...
The following pagination works but does not make the current page, bold and unclickable (no href)
Whats wrong?
$totalcount = mysql_query("SELECT COUNT(*) as 'total' FROM $table");
$row = mysql_fetch_assoc($totalcount);
$pages = ceil($row['total'] / $perpage);
for ($i = 1; $i <= $pages; $i++) {
if ($i != $page)
...