-3

I would like to pass a text string to a php file,

Here is my code:

var t2 = new Text(figure_defaultFigureTextStr, x, y + figure_defaultFigureRadiusSize/2,  
figure_defaultFigureTextFont, figure_defaultFigureTextSize);

t2.style.fillStyle = figure_defaultFillTextStyle;

f.addPrimitive(t2);
nicholaswmin
  • 21,686
  • 15
  • 91
  • 167

1 Answers1

1

Basically PHP is a server side language, you cannot execute it client-side.

So the best bid would be, to send a HttpPost request alongwith the variable value. This would send the data to the server. There you can save the data of it inside a file or what so ever.

Afzaal Ahmad Zeeshan
  • 15,669
  • 12
  • 55
  • 103