I have this kinda little problem using tinymce:
When I’m using the insert image/photo, because it asks the complete url when I upload the image/photo.
Here’s the text from mysql database when it was inserted:
<p>In mei 2012 is de Gijsbrecht aangekleed met mooie Hanging Basquets. Deze bloembakken, die bevestigd zijn aan de lichtmasten, zijn een fleurige aankleding van de straat! </p>
<p> </p>
<p><img src="upload/gijs.jpg" alt="" width="400" height="266" /></p>
Now on the image <img src=''> you can only see the upload/gijs.jpg, but what I did is insert it with complete url.
How can I implode it when inserting to the database?
My codes for insert:
if ( isset( $_POST['Save'] ) ) {
$email = $_POST['email'];
$t_u_c = $_POST['title_up_content'];
$u_c = $_POST['upcontent'];
$t_c1 = $_POST['title_col1'];
$c1 = $_POST['column1'];
$t_c2 = $_POST['title_col2'];
$c2 = $_POST['column2'];
$sql_insert_home = mysql_query( "INSERT INTO jon_homepage VALUE('', '$email', '$t_u_c', '$u_c', '$t_c1', '$c1', '$t_c2', '$c2', NOW() )" ) or die ( mysql_error() );
echo "<div id='successful'>You've successfully save data.</div>";
}
$c1 = $_POST['column1']; this is the text from the image
My website is http://www.degijsbrecht.nl/gijsbrecht/
Thanks everyone
You need to force TinyMCE to use absolute urls instead of relative urls, and to do this you need to add the next 3 lines in your
tinyMCE.init({});like this: