Board index   FAQ   Search  
Register  Login
Board index php forum :: HTML HTML Basics

html5 draggable attribute with php

Discussing Html . Code , Software , other

Moderators: macek, egami, gesf

html5 draggable attribute with php

Postby edcompsci » Wed May 02, 2012 1:48 pm

I know how to make something draggable in html5, but how might I do it with php, if for example a variable
Code: Select all
$var="sdfdfdsff"
and I want to do something like
Code: Select all
<p draggable="true"><?php $var="dfussd"; echo $var;></p>
but this won't work?
edcompsci
New php-forum User
New php-forum User
 
Posts: 2
Joined: Wed May 02, 2012 1:39 pm

Re: html5 draggable attribute with php

Postby egami » Fri May 04, 2012 4:17 am

PHP is an engine that generates HTML. Albeit I have not heard or know of being able to "drag" with straight HTML, but moreso probably with CSS & Javascript.
User avatar
egami
php-forum GURU
php-forum GURU
 
Posts: 2197
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: html5 draggable attribute with php

Postby freshnet » Mon May 07, 2012 9:42 am

there's a new html5 draggable attribute. Since this is related to the interaction with the user and not the display, it belongs in html not css.

Code: Select all
    <p draggable="true"><?php $var="dfussd"; echo $var;></p>


Why won't this code work? Are you sure that your test browser supports the attribute in plain html? Check the source code of your html page and see if anything looks strange.
User avatar
freshnet
php-forum Active User
php-forum Active User
 
Posts: 252
Joined: Tue Feb 22, 2011 8:19 am
Location: Canada


Return to HTML Basics

Who is online

Users browsing this forum: No registered users and 0 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.