-2

I would like create a page for client-side user to draw flowchart, most importantly can return the value of the drawing, for example, the typing in the box he draw, instead of end result in picture.

Can anyone give some advise what to be used and where to start ? Thank you. :D

jc_tan
  • 55
  • 1
  • 3
  • 9

4 Answers4

1

As the other's have mentioned, you'll need to use something other that PHP to accomplish the drawing part. http://diagramo.com/ is a pretty good plugin for what you're looking to do.

james_tookey
  • 885
  • 6
  • 12
1

If you really want to do this in pure PHP, you can use the GD library to create an image and draw shapes in PHP. There are tools to help with this if that's the direction you want to go, although the only one I could find in a hurry now was this one: http://phpflow.berlios.de/

However, I wouldn't suggest this as the way to go -- there are much easier ways to do this using client-side Javascript tools that do all the hard work for you; your PHP code just needs to handle the data, and the Javascript framework can draw the nice shiny graphics.

Further references:

Hope that helps.

Community
  • 1
  • 1
SDC
  • 14,192
  • 2
  • 35
  • 48
  • is tat possible to return the drawing variable, like what user type in the box he draw ? i not looking for export the drawing picture. sry for annoying question but i am new to this – jc_tan Nov 18 '12 at 14:09
0

You would need to use a client-side language or application for example, HTML5, JavaScript and/or JavaScript framework like jQuery or even something like Flash, which can interact with the user's browser ('the client'). Such a thing can't be done with a server-side language, which can only interact with the server on which it is running (your webserver).

For a little instruction to the HTML5 canvas element which may be of use to you, see Dive Into HTML5 - Canvas

Maccath
  • 3,936
  • 4
  • 28
  • 42
0

PHP is a server-side component, while user interaction requires something more interactive, which is called, for a reason, user-side. In case of web browsers it can be JavaScript or Java or DirectX or Flash or Silverlight or anything like that. But not PHP alone.

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141