Jump to content

dylanburford

New Members
  • Posts

    7
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

dylanburford's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. so do it like [code] fwrite($file, '<html><head><title>Test</title></head></html>'); fclose(); [/code]
  2. yeh but when i do that i get this error Parse error: parse error, unexpected T_VARIABLE in C:\xampp\htdocs\Qwakhouse\Layout\admin\makenews.php on line 69
  3. I am writing a simple news script for my site that writes a news HTML paragraph to a .txt file. But when i compile it (open it in a web browser) this is what i get: Parse error: parse error, unexpected T_VARIABLE in C:\xampp\htdocs\Qwakhouse\Layout\admin\makenews.php on line 69 The Script: [code] <?php /* For Username and Password */ $username = $_POST['username']; $password = $_POST['passord']; /* for posts */ $title = $_POST['title']; $post = $_POST['post']; $mainpost = $_POST['mainpost']; /* Other */ $num = '1'; if(empty( $username ) || empty($post)) { echo 'Username & Password are empty'; } else if(empty( $username )) { echo 'Username is empty'; } else if(empty( $password )) { echo 'Password is empty'; } else if( $username =='Josh' || $password =='tiki' ) { domakenews(); } else if( $username =='Allen' || $password =='jedi' ) { domakenews(); } else if( $username =='Dylan' || $password =='6483a66' ) { domakenews(); } else { echo 'Username or Password is empty'; } if( $username =='Josh' ) { $email =='blood_hoobit@hotmail.com'; } else if( $username =='Allen' ) { $email =='coheed_and_cambria_awmjr@hotmail.com'; } else if( $username =='Dylan' ) { $email =='dead_dylan665@hotmail.com'; } if(empty( $post) || empty($mainpost) || empty($title) ) { echo 'All Fields Are Empty'; } else if(empty( $post )) { echo 'Intro News is Empty'; } else if(empty( $title )) { echo 'Title is Empty'; } function domakenews() { if(empty( $mainpost )) { dointronews(); } else { dofullnews(); } } function dointronews() { $file = fopen('news.txt', 'a'); fwrite($file, " <p><h3>$title</h3></p> <h5>Posted By: $username</h5> <p>$post</p> <hr /> " ); } function dofullnews() { $file = fopen('news.txt', 'a'); fwrite($file, " $num = $num+1 <p><h3>$title</h3></p> <h5>Posted By: $username</h5> <p>$post | Read More...</p> <?php if( $pid =='102564456985214563256325632$num' ) { ?> <p><h3>$title</h3></p> <h5>Posted By: $username</h5> <p>$post $mainpost</p> <hr /> "); } ?> [/code]
  4. like if you have <bd> in a .html file could you use HTACCESS to replace <bd> with <b>?
  5. is it possible to do a string replace in HTACCESS, to replace all of a certain string in a directory with something else?
×
×
  • 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.