Hi Guys,
Im trying to load the contents of an html file into a text area for editing, this is the code I have so far but it doesnt seem to be working. I think it's because some of the $line have "" etc in them which is messing it up, any help/advice is greatly appreciated. I've also commented out some things i've tried and didnt work!
$handle = fopen("".$tmpfile, 'r');
$lines = file($tmpfile);
echo '<form method="post" name="box" action="">';
echo '<textarea name="codebox"></textarea>';
echo '</form>';
foreach ($lines as $line_num => $line)
{
//$line = htmlentities($line,ENT_QUOTES);
//echo $line;
print("<script language = 'javascript'>alert(".''.$line.");</script>");
//Typical Line <html xmlns="http://www.w3.org/1999/xhtml">
// echo "<script language = 'javascript'>var newtext = "."'".$line."'"."; document.box.codebox.value += 'newtext'; </script>";
// echo "". htmlspecialchars($line) . "<br />n";
}
fclose($handle);
Displaying an image using echo command
I had done a query on my database, one of the fields being an image reference to a directory where an image is stored. e.g "/images/picture.jpg"I want to display this image by using
How to get variable value on next page
Hello friends i am working on payentry page ..there i have this code......... Code: $str="select MAX(PSRN) from paymajor";$result=mysql_query($str) or
for some reason mysql query not working, not inserting, please check it out
This code is not inserting anything into my db, don't know why, the $_SESSION variable does contain data.Please have a look.Code: function add_user_to_db() {
Not loading image
When this function gets loaded it doesn't load the image just trying to figure out why.Code: function roleplay($fedid,$rp,$iframe,$dirpath,$folder,$headshot,$fullshot,$bioheadwidth,$bioheadheight){
Question about the upload of large files
Hi there,I have a question about the upload of large files, like videos (files generally above 20Mo).Is it better to use the FTP functions of php or the normal upload fonctions using additional
A Few Questions
Hi, I want to ask a few questions that I can't seem to find..1) I'm creating a "shortcut" system on my website, where users can add shortcuts from pages by clicking the link and it will
Request.UrlReferrer
I need to make it so that a page can only be loaded when a button is clicked on a specific page. I don;t want people to be able to browse directly to this page. Whati s the best wasy to achieve this?
Looking for help reading a .txt or .ini file and outputting the info.
I have a file called Info.ini and It has the following info:Code: [General]Online=0I would like it to be in a php file as just 0 if possible. Also how would I do this from php file to php file and let
Problem with DB connection
Hello there! I'm new to this forum and I'm new to PHP coding also. I wrote something that doesn't make exactly what I thought it will. Can you give me a hand please. There we go:Code: [Select]
HTML Email rec'd as Source Code
The code does create and send the email successfully. However, the message shows as html code and not an html email. Any ideas what is causing this?Thanks.Code: // Email require_once