Jump to content

willpower

Members
  • Posts

    296
  • Joined

  • Last visited

Posts posted by willpower

  1. I think its because you have double quotes around $clientCode. try changing it to

    $search_participant = "SELECT * FROM ' .$clientCode. 'm WHERE memName
    LIKE '%$namesearch%' ORDER BY memCode";

    ...and whats the m for...is this just a typo? and add single quotes around memName 'memName'

    Try that and see
  2. Hi

    This is known (i belive) as a SOAP request and callback.

    Basically its a web service where you are sending a reqest to their server and having information passed back to you in the form of the XML

    Now...I do the same thing (see my previous posts).

    The result is an array and I had to intall NuSOAP .php. Its free to download and sits on your server. This then acts as a soap server/client and allows you to easily pass the data back and too.

    The only otrher way is to actually parse the XML and extract the data...but thats very overblown.

    Get NuSOAP and do a few searches for SOAP XML PHP

    Once its all up their I can help with your code

    Will

  3. Wow...the array returned looks normal now.

    array (
    'handleSimpleUserUploadResult' =>
    array (
    'Username' => 'Banthien.hEynL',
    'Password' => 'dfrtMG',
    'Forename' => 'Alex',
    'Surname' => 'Banthien',
    'Email' => 'will@e-rizon.com',
    'Phone' => '01925 222 005',
    'Mobile' => '0780 392 7771',
    'Address1' => '49 Rushton Close',
    'Address2' => 'Burtonwood',
    'Address3' => 'Warrington',
    'Address4' => 'Cheshire',
    'Address5' => 'WA5 4HB',
    'MembershipNumber' => '000094',
    'PayPointId' => '00000184',
    ),
    )

    How do I now extract the membership Number to $membership_no

    I tried

    $member_no = $result['MembershipNumber']; //no result

    and

    $new_result= var_export($result,true);
    $member_no = $new_result['MembershipNumber'];// returned a value of "a"?????

    Any ideas?

    Thanks so far


    Will
  4. Welcome to the forum...you are in good hands.

    Forget the books jst yet and watch the forum for a while...just read the messages. It doersnt matter if you understand them at first...just get a feel for what is possible.

    After that decide what you might like to do...post the question and people will help. I knew nothing before i started on here....and with each day I learn more.

    Best wishes

    Will

    except how to spell
  5. You would expect that to work...but for a reason beyond my comprhesion it doesn't.

    The $result is populated by this piece of code

    $result = $soap_proxy->handleSimpleUserUpload($param);

    This is how I get the:

    Array ( [1] => Array ( [Username] => aaaaa [Password] => bbbbb [Forename] => Alex [Surname] => ccccc [Email] => will@xxxx.com [Phone] => 01925xxxxxx[Mobile] => 0780 xxxxxxx [Address1] => 49 xxxxxxx[Address2] => Bxxxxxx [Address3] => Warrington [Address4] => Cheshire [Address5] => xxxxxx [MembershipNumber] => 000056 [PayPointId] => 00000146 ) [value] => Array ( [Username] => aaaaa[Password] => bbbbb [Forename] => Alex [Surname] => xxxxx[Email] => will@xxxxx.com [Phone] => 01925 xxxxx[Mobile] => 0780 xxxxxx[Address1] => 49 xxxxxx[Address2] => xxxxxxxx [Address3] => Warrington [Address4] => Cheshire [Address5] => xxxxxx[MembershipNumber] => 000056 [PayPointId] => 00000146 ) [0] => handleSimpleUserUploadResult [key] => handleSimpleUserUploadResult )

    Now it is worth mentioning here that this is all driven by a SOAP Envelope Client (NuSOAP.php) request to a WS server. Although I can't see why that would make a difference. The $param is obviously populated and in turn populating the $result....but I can't extract ANY data from it....just keep getting blank returns

    Will
  6. The custom message is entered how...by form?

    If so you would simpoly collect that data and add it into the html page.

    But be careful....

    In HTML the process would be this

    <? $custom_msg= $_POST['formfiled'];?>


    <div class="message"><? echo $custom_msg;?></div> or something very similar.



    However

    in the >>>HTML_OUTPUT

    it simply has to be

    $custom_msg (where this value has already been set of course)

    WHY??? well the <? PHP are already open in your .php document and you are simply telling the php processor that you have HTML output where as in a normal HTML page you have to open the <? tags to start the processor and then close tthe ?> to parse the rest as normal HTML


    Will
  7. Again.,..if I undersand you...youcannot send an image in a plain text format.

    However...I might be able to solve your problem.

    I posted the solution for someone else.


    Go To

    [a href=\"http://www.phpfreaks.com/forums/imdex.php?showtopic75245&hl=\" target=\"_blank\"]http://www.phpfreaks.com/forums/imdex.php?showtopic75245&hl=[/a]

    Read the full post. My solution is at the end...but by reading it all you will gain a greater understanding of the issues.

    Will

    Let me know how you get on
  8. I may be way of track here...but I am assuming that the mail you are sending is in HTML format. Is this correct?

    If so you create the mail just like a page. In a page you only link to images...you do not embed them. If a email client can read HTML then it will link to the file and display it normally.

    To add to your problem...you need to be sending both an HTML version and plain text for those of us who choose not to read HTML files and the others of us who have the Dfault settings in Outlook sett to remove all images.

    Let me know a bit more about your process, goal etc and I will try to help

    Will

  9. [!--quoteo(post=351040:date=Mar 2 2006, 01:31 PM:name=dennnnnnis)--][div class=\'quotetop\']QUOTE(dennnnnnis @ Mar 2 2006, 01:31 PM) [snapback]351040[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    Creating the application - never done PHP before today.

    //d
    [/quote]
    Ok ...I am NOT going to code this for you....but I will help you learn.

    I am assuming that the html you are ok with.

    Basically your form action needs to target a php page....lets call it formprocess.php

    In this script you need to extract the values set in the form

    $question1=$_POST['formfield1']; So look up the $_POST procedure in the link below to understand what this does.

    repeat for all questions.

    Then you need to add the varialbles up

    $result = $question1+$question2...and so on

    Then you need to 'echo' a response. Echo means print to screen...Again look this up/

    To do this you will also need to 'response'. To decide what the response is goint to be we need an 'if statement'

    if ($response<>'somevalue') { do this } else { do this} Again look this up.

    Link is www.php.net This is the official documentation.

    Once you have processed some of this in your mind. Feel free to ask some specific questions and your code attempts. This way you are a) more likey to recieve specific answers and b) you will learn quicker.

    Good Luck with this...

    Will

    PS ...forget Dreamweaver doing the work for you...It simply cant. By all means write you code in it, but it causes more problems than it solves.

    Will
  10. Not sure about embedding it....but if you create the link with the absolute path rather than just ecard1.jpg...so in other words

    [a href=\"http://www.mydomain.com/myfolder/pictures/ecard1.jpg\" target=\"_blank\"]http://www.mydomain.com/myfolder/pictures/ecard1.jpg[/a]

    it will work

    Will
  11. The response I receive from a web service app is in the form of an array. This is set as $result.

    Heres the first part of code

    $item=each($result);
    print_r($item);

    and this returns the following (sensitive data replaced

    Array ( [1] => Array ( [Username] => aaaaa [Password] => bbbbb [Forename] => Alex [Surname] => ccccc [Email] => will@xxxx.com [Phone] => 01925xxxxxx[Mobile] => 0780 xxxxxxx [Address1] => 49 xxxxxxx[Address2] => Bxxxxxx [Address3] => Warrington [Address4] => Cheshire [Address5] => xxxxxx [MembershipNumber] => 000056 [PayPointId] => 00000146 ) [value] => Array ( [Username] => aaaaa[Password] => bbbbb [Forename] => Alex [Surname] => xxxxx[Email] => will@xxxxx.com [Phone] => 01925 xxxxx[Mobile] => 0780 xxxxxx[Address1] => 49 xxxxxx[Address2] => xxxxxxxx [Address3] => Warrington [Address4] => Cheshire [Address5] => xxxxxx[MembershipNumber] => 000056 [PayPointId] => 00000146 ) [0] => handleSimpleUserUploadResult [key] => handleSimpleUserUploadResult )

    Now you will note that this is a multi dimensional array. For some reason the data seems to appear twice...but Im not that bothered.

    I simple need to set $membership_no as the [MembershipNumber] value

    I have tried but in vain....any help much appreciated.

    Will
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.