Latest Posts

To transfer value from <select> tag to php you need to use <option> elements in <select>, and send data via a form with Submit button (or some javascript).
The "value" is added in <optioin>.
For example, you can use something like this:
<form action="prelucrate.php" method="post">

File Upload don't work

PHP - MySQL 37 3

AdminI not know whay it not works, it might be problem from the html form, or the column types in mysql, or variable with data for inserting in mysql is not defined.
If there is no error, try add: echo $sql; to see if all data are properly added...

JavaScript to Check if Div is in viewport

JavaScript - jQuery - Ajax 13 1

AdminTry the JavaScript script and example from this page:
- It can be used to check if a html element is in viewport, and to get its size and top/left position in page....

New on

Announcements & Support 1186 22

AdminelmPosiz - Get position, size and visibility in viewport of HTML element
A JS script that gets some useful data of a HTML element in page, like: top and left position, width and height size, and percentage visible in viewport.
It can be used to detect when...

AdminThis function, getBoxPS(), can be used to get the position and size (in pixels) of html elements in page.
It returns an object with four properties: {x:left, y:top, w:width, h:height}
//JavaScript function to get position and size of html element - /> //receives the element; returns object:...

AdminThat code not works because there are many double quotes inside string delimited with double-quotes in JS, and new lines in javascript string.
Pay more attention to string with quotes inside quotes.
Try this code:
echo '<script type="text/javascript">
var theDiv = document.getElementById("content'.$id22.'");
//Here we escape single quotes...

On Easter day

Spirituality 46 0

AdminOn Easter day the father comes to his son and says:
- Christ is Risen!
The child asks:
- Where is he?
Enlightened, his father says:
- In the universe of Love....

AdminI cannot test the code because i not have those mysql tables, but i can advice you to add an alias to GROUP_CONCAT:
$sql ="... GROUP_CONCAT( ORDER BY SEPARATOR ', ') AS areaid ...";
Then, in php use the added alias "areaid".
$var = $row['areaid'];...

AdminYou can add an Alias to the selected columns (with AS).
$sql ="SELECT, AS namet1, AS namet2 FROM table1 AS t1, table2 AS t2";
- In php the results set will be with the name defined as alias. The array will have the keys:...

AdminWhen I wanted to learn to code with Angular JS I saw that Google team has in development Angular 2.
Well, I said myself to wait a little longer till Angular 2 will be a stable version and with some more documentation with JavaScript.
Now, when I looked...

php maximum upload file size

PHP - MySQL 38 3

AdminI not have experience with hosting and server settings; but you can try to change those settings in php.ini and see if it works.
- After you make and save the changes, you must restart the server.
This is all I know about this subject....

You can use file_get_contents() to get a string with file data.
Then, with explode() you can split that string by the separator you want, and store the resulted items into an array.
- Here is a code example:
$file ='path_to/filename'; //path to the text file

Subscribe to forum posts

Announcements & Support 60 4

AdminYou can also use a service that suscribes you to rss atom feed.
- Rss for forum posts:
- Rss for site articles:...