Welcome Guest, Not a member yet? Register   Sign In
  struggle in paypal
Posted by: El Forum - 11-22-2008, 05:21 AM - Replies (1)

[eluser]nandish[/eluser]
Hi guys am using below form to communicate with paypal after paying amount successfully it wont return any post varibles or its not appending any parameters in the querystring...please help me out

payment.asp

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="package_id" value="">
<input type="hidden" name="notify_url" value="http://vip.labuno.com/candidates/response.asp">
<input type="hidden" name="frequency" value="">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" id="item_name">
<input type="hidden" name="amount" id="amount">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="return" value="http://vip.labuno.com/candidates/response.asp">
<input type="hidden" name="cancel_return" value="http://vip.labuno.com/candidates/payment.asp">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="lc" value="IN">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="bn" value="PP-BuyNowBF">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" name="submit" alt="Thank you for your donation!!!">
</form>


response.asp

<h1>Thank you</h1>
<%
Response.write(request.querystring)
%>
&lt;form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"&gt;
&lt;input type="hidden" name="cmd" value="_notify-synch"&gt;
&lt;input type="hidden" name="tx" value="98B16301E2088271M"&gt;
&lt;input type="hidden" name="at" value="YourIdentityToken"&gt;
&lt;input type="submit" value="PDT"&gt;
&lt;/form&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;

Thanks in advance


  bug in form_validation matches function?
Posted by: El Forum - 11-22-2008, 04:27 AM - Replies (5)

[eluser]Khoa[/eluser]
When I use matches in the new form_validation library with the following settings:

Code:
// Inside the application/config/form_validation.php

array(
    array(
        'field' => 'password',
        'label' => 'password',
        'rules' => 'required|min_length[5]|max_length[20]|matches[password2]|md5|trim'
    ),
    
    array(
        'field' => 'password2',
        'label' => 'confirmed password',
        'rules' => 'required'
    )
)

it produces the following error message:

"The password field does not match the password2 field."

Shouldn't it be:

"The password field does not match the confirmed password field." ?

I think it should be putting in the field label rather than the field name itself.

We probably can fix it inside the form_validation.php lib, but I don't know how (:-P), so maybe someone can help me out if they already know how to fix.

Thanks.


  How to use template parser to preselect drop down box?
Posted by: El Forum - 11-22-2008, 04:00 AM - Replies (1)

[eluser]Khoa[/eluser]
Hi,

I have a view that contains a form, inside that form I have a dropdown box that contains the list of countries as follows:

Code:
// inside the form.php controller

$data['countries'] = "SOME QUERY TO GET THE LIST OF COUNTRIES IN RESULT_ARRAY";
$this->parser->parse('form', $data);

// inside the form.php view

<select>
   {countries}
      <option value="{id"}>{name}</option>
   {/countries}
</select>

How can I make Australia, which has the country id of 13 in this case, to be selected by default?

I tried the followings but they don't work:

Code:
// This does not work
<select>
   {countries}
      <option value="{id"} &lt;?php if($id == 13) echo "selected"; ?&gt;>{name}</option>
   {/countries}
</select>

// nor does this
<select>
   {countries}
      <option value="{id"} &lt;?php if("{id}" == 13) echo "selected"; ?&gt;>{name}</option>
   {/countries}
</select>

Any idea how to do this?

Thanks


  Forum Search Not Working
Posted by: El Forum - 11-22-2008, 03:59 AM - No Replies

[eluser]doehoe[/eluser]
Hi.

I really like the CodeIgniter community and these forums, but there is one big problem I have been experiencing ever since I joined...

There is something wrong with the search on these forums. 90% of the time when I try search for something I get sent to the advanced search page, and if I try to search for it from there, I get sent straight back to the same page.
I thought maybe this had to do with my searching for a term which returned no results, but I searched for the same term twice in a row (the term I used was "forum"). The first time the relevant results were listed (luckily this was 10% of the time when it works), but the second time I got the same problem described above.
This happens both in Firefox and Internet Explorer.

Please can you let me know what the cause of this is, as I understand that it is proper etiquette to search through forums (for an answer) before asking a question.

Thanks Smile


  validation error message
Posted by: El Forum - 11-22-2008, 01:58 AM - Replies (1)

[eluser]Unknown[/eluser]
i want to display different error message for different kind of validation in a single textbox.
normal validation error display is showing predefined error message which i want to override.


  How can I upload chm files in windows?
Posted by: El Forum - 11-22-2008, 12:51 AM - No Replies

[eluser]sexy22[/eluser]

in application/config/mimes.php

how to make over?

thanks!


  Why use CI Sessions
Posted by: El Forum - 11-21-2008, 09:17 PM - Replies (4)

[eluser]jtingato[/eluser]
I had posted a sessions question a while back and thank you for your answers, but I do have a few more.

What are the benefits of using CI sessions? It appears to me that one benefit is more control of the life of each session. Also, I do like not having to session_start on every page.

But the CI session info is stored in cookies / client side.

Isn't that more prone to errors and security issues?

Plus, if cookies are disabled at the user's browser, then what? I don't believe browsers can disable PHP sessions, true?

I am sure there are benefits to CI's version and perhaps I'm not experienced enough to see them. Isn't that why you're here? :lol:

John


  POST array missing submit button
Posted by: El Forum - 11-21-2008, 08:34 PM - Replies (1)

[eluser]jtingato[/eluser]
Very weird.

My form has two submit buttons, "order" and "save" plus 12 combo boxes. Upon submition, I need to know which button was chosen. I have redirected the forms action to a simple php page with print_r($_POST), so I can see what is in the array. Everything is listed except the submit buttons.

Does anyone have any idea why this would be happening? I briefly looked thru the Input class to see if anything stood out. In Input class, var xxs_clean=FALSE. I was thinking CI was somehow clensing the POST.

Also, jQuery.js is installed on this site. I know that's not relative to this forum, but when I comment out the reference to the JS file, the submit button show up in print_r().

Any help would be appreciated, even if you just tell me its not CI... go to a jQuery forum.

Thanks in advance.

Below I have included the first few items of the form


Code:
&lt;!-- Start Button Box --&gt;

                            <div class="buttonBox">
    
                                &lt;input name="save" type="submit" id="save" accesskey="s" value="Save" class = "required" /&gt;
                                •
                                &lt;input name="order" type="submit" id="order" accesskey="o" value="Order" class = "required" /&gt;
                                •
                                &lt;input name="reset" type="button" id="reset" accesskey="r" value="Reset"&gt;
    
                            </div>

                        &lt;!-- End Button Box --&gt;

&lt;!------------------------------------------------------------------------------------------------&gt;                            

                        &lt;!-- Start Details Box --&gt;

                        <div id="details">                        

                            &lt;!-- Start Base Box --&gt;

                            <div id="baseBox">                            

                                &lt;!-- Start Base Combo --&gt;

                                <div id="baseCombo">

                                    <label for="base">Base</label>

                                    <select name="base" id="base" class="required main">

                                        <option value="none" selected>-- Select a Base --</option>

                                        &lt;?=$baseOptions?&gt;

                                    </select>

                                </div>

                                &lt;!-- End Base Combo --&gt;

                                

                                &lt;!-- Start Base Options --&gt;

                                <div id="baseOptions" class="options">

                                

                                    &lt;!-- Start Base Color Combo --&gt;

                                    <div id="baseColorCombo">

                                        <label for="baseColor" class="sub">Color</label>

                                        <select name="baseColor" id="baseColor" class="required">

                                                <option value="none">Choose a Base</option>

                                        </select>

                                    </div>

                                    &lt;!-- End Base Color Combo --&gt;


  CodeIgniter "cant be found" on server
Posted by: El Forum - 11-21-2008, 07:07 PM - Replies (3)

[eluser]Fabdrol[/eluser]
Hi All,

I've got this very unusual problem. I uploaded my latest project to my clients web hosting, using Coda. (Coda is a great OS X web dev IDE) Problem with Coda is, it doesn't fix permissions for the web, so the files get uploaded without permissons at all. It resulted in Safari not loading the CSS and javascript files.

So, I fixed it by uploading the scripts and stylesheets using Cyberduck, a ftp client for mac. Now, the JS and CSS files workt. But, now just the index.php page workt! when I follow a link, and the address changes from http://www.stefanieklein.nl/ to http://wwww.stefanieklein.nl/index.php/w...e40424bb1e (or similar) it didn't work.

so, I figured there would be something wrong with the permissions of some files, so I deleted all files on the remote server and uploaded all files using Cyberduck.. but now, non of my pages can be found! I think it has something to do with the host, but I can't find anything of how this should be done!

here's the uri: www.stefanieklein.nl

thanks in advance,

Fabian


  Scale an image (math question rather than coding really)!
Posted by: El Forum - 11-21-2008, 07:00 PM - Replies (1)

[eluser]bapobap[/eluser]
Hi everyone.

I have a bit of a math type question, rather than a code question.

I'd like to scale an image so that it retains its aspect ratio but is at least big enough to allow a crop of certain dimensions.

Take this for instance. Say I wanted an image to be 720x480. My source image is something crazy like 2383x1643. I want to scale the image down, retaining its aspect ratio but keep it at a size so either one of the dimensions doesn't fall below my target dimensions. For instance if I just scaled it straight off, maintaining the aspect ratio, one of the dimensions might fall below my required dimensions, meaning I have a source image smaller than my minimums in one of the dimensions.

I don't really need the code to do this, I understand how CI's Image Lib handles crop and scale, I think this is a bit different and is more of a formula?

The aim is to take an image, of any crazy dimensions, scale it down to a set of target dimensions, getting as close as I can yet not falling below my minimums. I can then present a user with a JQuery plugin that will allow them to select a crop area to use, I can then use the CI Image Lib's to do the work.

I hope this makes sense?! Probably not, late night and I'm terrible at maths.

Thanks if anyone can help!


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
Error / Shield 1.0.3 + Ci...
by kenjis
2 hours ago
Integrating Bootstrap 5 i...
by tarcisiodev1
3 hours ago
Asset Minification Packag...
by tarcisiodev1
3 hours ago
Modify users data as an a...
by luckmoshy
4 hours ago
Is it possible to go back...
by ejimenezo
9 hours ago
SQL server connection not...
by davis.lasis
Today, 07:11 AM
Validation | trim causes ...
by Gary
Today, 05:09 AM
Problem with session hand...
by Julesb
Today, 04:13 AM
External script access to...
by PomaryLinea
Today, 03:58 AM
VIRUS reported after Chro...
by InsiteFX
Yesterday, 11:34 PM

Forum Statistics
» Members: 85,497
» Latest member: okkubetcom
» Forum threads: 77,586
» Forum posts: 376,025

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB