Pure PHP Upload 3 Support Product Page

Answered

dynamic folder

Asked 09 Sep 2014 07:05:38
1
has this question
09 Sep 2014 07:05:38 Louis Stargel posted:
Trying to upload my images to a dynamic folder. I have a data binding called PostId I need to upload those image to a folder with that Id.
I've stored the PostId in a Session Variable and set my upload folder in PPU3 to "../uploads/".$Session['PostId']
Here is the code for my session variable:
$_SESSION['PostId']="{{PostDetails.data[0].PostId}}";

It uploads the images to a folder called {{PostDetails.data[0].PostId}}.
I've test and it does store the PostId in the variable here is the test that i out put on my page
<?php 
// store session data
$_SESSION['PostId']="{{PostDetails.data[0].PostId}}";
echo $_SESSION['PostId'];
?>

It will out put the correct PostId on the page.
I've even tried to just do this for my PPU3 upload folder
"../uploads/"."{{PostDetails.data[0].PostId}}"

Can you help me with this Thanks


Replies

Replied 09 Sep 2014 08:22:46
09 Sep 2014 08:22:46 Teodor Kuduschiev replied:
Hi Louis,
Unfortunately it is not possible to mix server-side code with the HTML5 Data Bindings code. The {{data.element}} bindings are being executed only client-side, while PHP code is executed on the server.
Replied 06 Nov 2024 14:02:08
06 Nov 2024 14:02:08 Adam Jack replied:
Love how this dynamic folder keeps everything so organized! If you're looking for a sweet treat to go with your productivity, I highly recommend trying out a gluten-free vegan cake. It's the perfect balance of delicious and healthy!

Reply to this topic