Jump to content

[SOLVED] php and javascript


adam291086

Recommended Posts

I have never tried this before, but i am trying to run a some php within a javascript function but i asuming i am doing something really wrong can somebody help me

 

here is my javascript function

 

function update_database(el)

{
    var height;
    var width;
    var top; 
    var left;
    var Div_name;
    var Border;
    var Position;
    var Background;
    var Cursor;

    height = el.style.height;
    width = el.style.width;
    top = el.style.top;
    left = el.style.left;
    Div_name = el.id;
    Border = el.style.border;
    Position = el.style.position;
    Background = el.style.background-color;
    Cursor = el.style.cursor;

<?php

$conn;
mysql_query("UPDATE Admin_Page_Style SET Style_Left = 'left',Style_Top = 'top',Style_Height = 'height',Style_Width = 'width',Style_Position = 'Position',Style_bgcolor = 'Background',Style_Cusor = 'Cursor',Border = 'Border',div_name = 'div_name',
WHERE div_name = 'div3'");

?>

}

 

i need the function to get some of the page elements style details and upload them into the database

Link to comment
https://forums.phpfreaks.com/topic/111270-solved-php-and-javascript/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.