imagezilla api Failed - html

I'm trying to create a page that uploads an image to imagezilla using their api, but having no luck. Below is the code i'm using, but without the apikey, username and password for obvious reasons
<html>
<body>
<form action="http://imagezilla.net/api.php" method="post">
<input type="file" name="file" accept="image/x-png, image/gif, image/jpeg" />
<input type="hidden" name="apikey" value="..." />
<input type="hidden" name="username" value="..." />
<input type="hidden" name="passwordmd5" value="..." />
<input type="hidden" name="testmode" value="1" />
<input type="submit" />
</form>
</body>
</html>
All I keep getting in return is no file uploaded, even if I take the testmode out it still does it.
The website is not very helpful http://imagezilla.net/api-docs.php
Any help would be Great. Jamie

Although I have no experience of working with Imagezilla, I suspect that you need to correctly set the enctype of your form:
<form action="http://imagezilla.net/api.php" method="post" enctype="multipart/form-data">
<input type="file" name="file" accept="image/x-png, image/gif, image/jpeg" />
<input type="hidden" name="apikey" value="..." />
<input type="hidden" name="username" value="..." />
<input type="hidden" name="passwordmd5" value="..." />
<input type="hidden" name="testmode" value="1" />
<input type="submit" />
</form>

Related

Paypal button shows empty shopping cart

Why does this give me an empty shopping cart ? A single item works just fine.
Any ideas anyone, if it helps (or doesnt) PayPal support could not help either.
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="xxxx.xxxx#xxxx.net">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="My Shopping Cart">
<input type="hidden" name="currency_code" value="GBP" />
<input type="hidden" name="display" value="1" />
<input type="hidden" name="upload" value="1" />
<input type="hidden" name="amount_1" value="12.00" />
<input type="hidden" name="amount_2" value="45.00" />
<input type="hidden" name="amount_3" value="6.00" />
<input type="hidden" name="amount_4" value="17.00" />
<input type="hidden" name="amount_5" value="98.00" />
<input type="hidden" name="item_name_1" value="ADCDE" />
<input type="hidden" name="item_name_2" value="DEFGH" />
<input type="hidden" name="item_name_3" value="KLMNO" />
<input type="hidden" name="item_name_4" value="PQRST" />
<input type="hidden" name="item_name_5" value="STUVW" />
<input type="hidden" name="image_url" value="http://xxxxxxx.co.uk/images/50x50.jpg" />
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynow_LG.gif:NonHostedGuest">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="">
<input type="hidden" name="return" value="http://xxxxxxx.co.uk">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
You specified two conflicting actions (display and upload). Remove the display command and it should work fine.
Try adding a method to your first form tag as in action="https://PayPal.com/blBlabla " method="post"

PayPal checkout html form not working

i have some difficulties with defining html form for PayPal checkout,
i always use the same code but this time something go wrong,
i'm trying to send the user for paypal page to pay the all cart at once and
i'm getting an error:
We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the "Ask Seller a Question" link on the listing page. When you have the correct email address, payment can be made at www.paypal.com.
i checked the account setting and it seems to be ok, Account Type: Business Status: Verified, i also add the ipn address in the account and turn it to ON
this is my code:
<form method="post" action="https://www.paypal.com/cgi-bin/webscr" id="paypal" name="paypal">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="business#email.com‏">
<input type="hidden" name="currency_code" value="ILS">
<input type="hidden" name="rm" value="2" />
<input type="hidden" name="return" value="http://www.example.com/orderSubmited.php" />
<input type="hidden" name="notify_url" value="http://www.example.com/paid.php" />
<input type="hidden" name="cancel_return" value="http://www.example.com" />
<input type="hidden" name="shipping" value="0" />
<input type="hidden" name="charset" value="utf-8">
<input type="hidden" name="item_name" value="payment>
<input type="hidden" name="item_number" value="123456" />
<input type="hidden" name="amount" value="250" />
<input type="hidden" name="quantity" value="1" />
<input type="hidden" name="address1" value="Address" />
<input type="hidden" name="city" value="City" />
<input type="hidden" name="zip" value="Zip" />
<input type="hidden" name="email" value="customer#email.com" />
<input type="hidden" name="first_name" value="CustomerFirstName" />
<input type="hidden" name="last_name" value="CustomerLastName"/>
</form>

How to store images submitted from a form in a temporary hidden input?

I need to have two step submission form which accepts multiple images to be uploaded to server. The problem here is I need to have some temporary hidden inputs for storing values from the first step to acquire more info in the second step before the actual submission.
Take a look the following codes.
This is for example, the first step:
<form action="" enctype="multipart/form-data" method="post">
<input type="hidden" name="step" value="1" />
Name: <input name="name" value="" type="text" />
Email: <input name="email" value="" type="text" />
Image 1: <input type="file" name="images[]" />
Image 2: <input type="file" name="images[]" />
<input type="submit" value="Submit" />
</form>
The following will be the second step:
<form action="" enctype="multipart/form-data" method="post">
<input type="hidden" name="step" value="2" />
<input name="name" value="<?=$_POST['name'];?>" type="hidden" />
<input name="email" value="<?=$_POST['email'];?>" type="hidden" />
<!-- Here is the problem, how should I store the submitted images for the time being? -->
<input type="file" name="images[]" />
<input type="file" name="images[]" />
<!-- ... -->
Please select a type:
<select name="type">
<option>Type 1</option>
<option>Type 2</option>
</select>
<input type="submit" value="Submit" />
</form>
Please note that this code is just for the sake of clarification and is by no means the actual code.
They should be stored in $_FILES I think. You can also use move_uploaded_file() for storing the files temporarly. See: php-manual

How to insert parameter to url from html form?

I have a link class.php?event=donbass2012
and I have a html form. How to send value from form to url to get link like this:
class.php?event=donbass2012&class=f1a
Just use a normal GET form, with whatever inputs you need.
<form action="class.php">
<input type="hidden" name="event" value="donbass2012">
<input type="hidden" name="class" value="f1a">
<input type="submit">
</form>
Is this what you want?
<form name="input" action="class.php" method="get">
<input type="hidden" name="event" value="donbass2012" />
<input type="hidden" name="class" value="f1a" />
<input type="submit" value="Submit" />
</form>

paypal button problem on IE

hello
In my app I have a PayPal Pay Now button (working on Sandbox mode atm)... it works great on every browser except IE... What is happening? in every browser (FF, Chrome, Opera) when I press on the button it redirects me to the page I want (the page where you pay for the item) but in IE it redirects me to normal login page, not the page in which I have to pay?
anyone knows the reason why is that? This is the last thing I have to complete to make my app working.
here is my button code:
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="ABCDEFGHXXXX" />
<input type="hidden" name="lc" value="AU"/ >
<input type="hidden" name="item_name" value="Item" />
<input type="hidden" name="amount" value="5.00" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="button_subtype" value="services" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="rm" value="1" />
<input type="hidden" name="return" value="http:/www.domain.com/thanks.php" />
<input type="hidden" name="cancel_return" value="http:/www.domain.com/canceled.php" />
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_paynowCC_LG.gif:NonHosted" />
<input type="hidden" name="cbt" value="GO BACK TO XXXXX APP" />
<input type="hidden" name="custom" value="XXXXXXXXXXXXX" />
<input type="image" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_AU/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" style="background-color: #fff;" />
<img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_AU/i/scr/pixel.gif" width="1" height="1" />
</form>
Are you sure it's a PayPal account login screen you're seeing? If it says "Please login to use the PayPal Sandbox features." that means you're not logged in as a developer on https://developer.paypal.com/
If you want to use the Sandbox site, in any browser, you need to be logged in to https://developer.paypal.com/ -- that's of course not a restriction you'll see in the live site.
Your code looks fine to me, anyway.