in

Quark Forums

how to integrate PHP and mySql in Quark 8

Last post 12-03-2010 3:21 AM by Odin. 48 replies.
Page 1 of 4 (49 items) 1 2 3 4 Next >
Sort Posts: Previous Next
  • 03-04-2010 6:24 AM

    how to integrate PHP and mySql in Quark 8

    Hi,

    Can I have PHP scripts integrate in Quark to 'talk' with mySql databases on our server? We build webtraffic campaigns in Flash now. First design, than rebuild it in Flash, than integrate PHP scripts to upload respons from mySql database or prefill fields with customer details from a mySql database. I want to skip Flash. So now we've built a website for our customer in Quark Interactive, but our PHP programmer tells me he cannot program when he opens the .swf file in Flash. Thus the only option is to PHP in Quark...

    Hope to hear from you soon..

    David Verburg
    dutch_dave
  • 03-04-2010 6:57 AM In reply to

    Re: how to integrate PHP and mySql in Quark 8

    Hi Dave,

    you can communicate using URLs or by posting via POST/GET, so yes.

    See the thread just a few days ago how to trigger a Server Script for sending email.

    Thanks
    Matthias

    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling and do not have access to the forums, I will not be able to respond to forum posts currently.)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need immediate help? Please contact Quark's support: http://support.quark.com/contact_us.html

  • 03-04-2010 8:44 AM In reply to

    Re: how to integrate PHP and mySql in Quark 8

    Hi Matthias,

    Than I should find myself a PHP programmer who has Quark 8. Any ideas? :-)

    Regards,

    David

    David Verburg
    dutch_dave
  • 03-04-2010 9:03 AM In reply to

    Re: how to integrate PHP and mySql in Quark 8

    Hi Dave,

    wait, I hope we are talking about the same thing:

    You want to create a SWF that upon runtime interacts with some server logic/script (using PHP). The PHP script wouldn't run "inside" QuarkXPress or the SWF, it reacts to data being sent from the SWF via get/post and sends back plain text or changes picture URLs that are loaded in the SWF.

    Is that your understanding too?

    Thanks
    Matthias

    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling and do not have access to the forums, I will not be able to respond to forum posts currently.)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need immediate help? Please contact Quark's support: http://support.quark.com/contact_us.html

  • 03-04-2010 9:15 AM In reply to

    Re: how to integrate PHP and mySql in Quark 8

    Please look at this URL: http://www.win750euro.nl/matthias (login code: 99999)

    This what we call webtraffic campaign: a customer receives a postcard with personal URL and login code.

    Does it make it clear what we want to achieve? These pages are personal (Dear Mr. Matthias, customers details etc., validations scripts etc.). So I think we should program in Quark. Don't you think?

    David Verburg
    dutch_dave
  • 03-05-2010 12:15 AM In reply to

    Re: how to integrate PHP and mySql in Quark 8

    Ok, I tried it and won 750 EUR, looking forward to it ;-)

    I think I understand now, so what you need is a generic SWF that allows entering a passcode, sends that to a server, the passcode is associated with an address and then the SWF becomes personalized, it shows the associated personal data.

    I am positive that this is possible, as SWFs out of QuarkXPress can send data to a server and receive data back. As this is done via GET/POST URLs you need to remember that the data transmission is not secure.

    However it woudl be interesting to test this and see whether it really works. If you want, I can help you with the client side (so in QuarkXPress 8).

    And you wouldn't need a programmer who knows QuarkXPress, as all you'd do is pass URLs aroudn and read from URLs.

    Thanks
    Matthias

    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling and do not have access to the forums, I will not be able to respond to forum posts currently.)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need immediate help? Please contact Quark's support: http://support.quark.com/contact_us.html

  • 03-05-2010 2:12 AM In reply to

    Re: how to integrate PHP and mySql in Quark 8

    You lucky man! 750 euro in new menswear. Good on 'ya! You must cash in Holland though... ;-). Seriously. As you see the website you saw has been made in HTML. I have a little knowledge about Dreamweaver, so I can see that the actual PHP scripting has been done with .php files like start2.php. This file checks the name at the end of the personal URL and number and routes the customer to a different page when the URL of login code is wrong.

    So I have the feeling with POST and GET it must work. Enclosed the lines in the login page:

     <form name="form1" method="post" action="start2.php">
      <p align="center">&nbsp;</p>
    </form>

    If you can tell me how I can activate this start2.php file in Xpress (I know how to make objects, events and scripts). I will make an object that is called 'login' and a textfield 'login_number' (no experience though with fields, but that must not be that hard). I can check if this works. It's the most important part of the session. If this works, I'm sure the rest of the pages (most of it, get data from mysql en post the respons back into mysql).

    Regards,

    David

    David Verburg
    dutch_dave
  • 03-05-2010 2:30 AM In reply to

    Re: how to integrate PHP and mySql in Quark 8

    Hoi David,

    Duitsland is niet te ver weg van Nederlands :-)

    For a simple test, create a layout with two text boxes. Make both of them Textbox objects (in Object tab), type Editable, and give them the exact names you specified above.

    Now create a button (or aynthing else that triggers the script) and upon Event "click up" execute the action "Text > Post to URL", "All editable Objects", method POST.

    For the URL you need to enter the URL of your PHP script, so select external reference and in the path field enter the URL.

    That should work.

    Just, if your script redirects, you need to load a new Flash file then. How do you plan to do that?

    Regards
    Matthias

    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling and do not have access to the forums, I will not be able to respond to forum posts currently.)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need immediate help? Please contact Quark's support: http://support.quark.com/contact_us.html

  • 03-05-2010 3:33 AM In reply to

    Re: how to integrate PHP and mySql in Quark 8

    Hallo Matthias,

    also Deutsch... dann wird es also einfach sein um dein Voucher ein zu wecheln. :-)

    We have build the new website for Van der Kam in Xpress. So enclosed you find the first page. We will try to build in your tips in this page today. And yes, it redirects indeed. Start2.php will active retour_server.php.loginpage

    Keep u informed!

    Regards,

    David Verburg
    dutch_dave
  • 03-17-2010 6:55 AM In reply to

    Re: how to integrate PHP and mySql in Quark 8

    Hi Dave,

    as I just created a form and PHP script for our Flash8Magic page, for everybody who's interested here's how I did it:

    1. Create a page with text boxes and a submit button. (My example uses five text boxes.)
    2. Make all text boxes editable text boxes in Interactive palette (object tab). Write down the names of the boxes.
    3. For the button create an event "click up" that triggers an action "Internet > Submit Page", method POST, to the URL of my PHP script (e.g. "http://www.yourdomain.com/mailscript.php").

    The sendmail PHP script looks like this, note that the red names are matching the names of the box names in QuarkXPress 8:

    <?php
    // Fields from SWF form post follow
    $name = $_POST["name"];
    $surname = $_POST["surname"];
    $email = $_POST["email"];
    $country = $_POST["country"];
    $message = $_POST["message"];
    // Definition of email that will be send follows
    $to = 'yourname <yourname@yourdomain.com>';
    $headers .= 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= 'From: yourname <yourname@yourdomain.com>' . "\r\n";
    $headers .= 'Reply-To: yourmail@yourdomain.com' . "\r\n";
    $subject = 'Your Subject';
    $body = "
    <html>
      <body>
        <p>Name: $name $surname</p>
        <p>Email: $email</p>
        <p>Country: $country</p>
        <p>Message: $message</p>
      </body>
    </html>
    ";
    // Mail command follows
    mail($to, $subject, $body, $headers);
    ?>

    4. Copy this script into a text editor and save as mailscript.php and upload to your server.

    Done!

    (Of course you need to adjust the blue fields. Also, my script was a bit more fancy, as I check for a valid email address and disable the button after submitting. If you are interested how I did that, please let me know.)

    Now your Flash (SWF) file will pass the data entered into the SWF to the PHP script and send a mail via your server without any further user interaction or client-side mail program.

    Enjoy!
    Matthias

    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling and do not have access to the forums, I will not be able to respond to forum posts currently.)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need immediate help? Please contact Quark's support: http://support.quark.com/contact_us.html

    Filed under: , , , ,
  • 03-18-2010 4:23 AM In reply to

    Re: how to integrate PHP and mySql in Quark 8

    Hi Matthias,

    I didn't have time to look into it. Saved it on my desktop and will look into it next week. Keep u informed.

    Regards,

    David Verburg
    dutch_dave
  • 04-15-2010 7:56 AM In reply to

    Re: how to integrate PHP and mySql in Quark 8

    Could you please give us a sample file ? or put a video on the magic videos?
  • 04-15-2010 3:45 PM In reply to

    Re: how to integrate PHP and mySql in Quark 8

    Hi Helene,

    of course.

    Can you tell me what you are looking for? So what does your form look like, a layout that collects name, email address and country and you want to receive that via email? Any other elements? Do you maybe already have a (static) form you want to share?

    Do you want this to be triggered via a PHP script as above?

    Thanks
    Mattias

    Matthias Günther
    Senior Product Manager
    Quark Software Inc.

    (Please note: As I am traveling and do not have access to the forums, I will not be able to respond to forum posts currently.)


    Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here:
    English: http://youtu.be/Gldk5lvXXTA
    French: http://youtu.be/nsgB4Q7lQzg
    German: http://youtu.be/lecdenqaUGY
    Italian: http://youtu.be/wjBpYZsF-8s


    Need immediate help? Please contact Quark's support: http://support.quark.com/contact_us.html

  • 05-17-2010 3:44 PM In reply to

    Re: how to integrate PHP and mySql in Quark 8

    Hello How did you get this page http://www.win750euro.nl/matthias to center in browser then move to center when someone changes size of browser I am working in Quark 8. Thanks
  • 05-18-2010 1:36 AM In reply to

    Re: how to integrate PHP and mySql in Quark 8

    Don't know. Ask Matthias...

    Regards,

    David

    David Verburg
    dutch_dave
Page 1 of 4 (49 items) 1 2 3 4 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems