MS Expression Web Adds Unwanted <br/> Tag?

Nov 10, 2009

My original one seems to have not appeared. Maybe it will show up.I am using header to do a redirection.The code:

header('Location: blah blah');



Sent Emails Adds Unwanted Slashes In Email Source?

Oct 7, 2009

I have two servers in the office:1) testserver 'live' server servers use the same smtp server ( to send emails.When I send emails from the test server (in html markup) the email is received correctly. When I send email via the 'live' server, the layout is distorted.The reason is that emails from the 'live' server (looking at the source message) has slashes added in the markup somehow.

So for instance
Quote: <table width="100%">
Quote: <table width="100%">

I don't know why this is, or if it is a php issue. Does anybody know how to resolve this or where to look at

View 3 Replies View Related

Textarea Code Adds Unwanted Extra Data To The End?

Oct 26, 2010

I'm having a problem with some php code that allows you to edit a text file. No matter what file it loads, it always adds four horizontal tabs and two spaces to the end of the text. I've attached the code to this post.

View 2 Replies View Related

JavaScript Math Expression Formatters (which Adds Brackets)?

Oct 18, 2010

Google Calculator formats math expressions this way:

2+2/2 ---> 2 + (2 / 2)
2+2/2*PI ---> 2 + ((2 / 2) * PI)

In others words - it adds brackets.Are there any similar PHP or JavaScript solutions to do the same thing?

View 2 Replies View Related

Basic Script - Insert Name = Finds Name And Adds Point Or Adds Name And Adds Point

Mar 22, 2010

I am trying to write a basic script but I am new to PHP. I was wondering whether this should go in Newbie section or coding but I decided on posting here. I apologize for not spotting similar threads but there are so many its hard to tell what it the right stuff.

I am attempting to write a script. This is basically what it needs to do. User goes to page Enter name in form and submit Script adds name to database (column=username) and also adds 1 point to the point columns value (column=points) If name is already inserted it simply adds a point to the point column rather than making a new column User then visits output page So far the script adds a name to the database in the correct column. If you enter it twice it makes another field that is identical. Here is the code I am using:


View 14 Replies View Related

PHP Adds Hidden Value

Jul 30, 2006

Hallo, just today, trying to validate the code of a site of mine written
in php, I discovered that is segnalled the presence of this line:

<input type="hidden" name="PHPSESSID"
value="c108f42e24e7111ec399772308b24cb3" />

line that in the source code doesn't exist, I have checked and checked
again. Is it possibile some strange thing? Could I avoid it? For when I
try to validate the page, such page is indicated as containing an error

But stranger again, the same script if executed on a Linux Server doesn't
show this strange behaviour.

View 16 Replies View Related

Resin Adds PHP

Dec 19, 2005

Interesting development?

View 5 Replies View Related

Mysqli_real_escape_string Adds

Dec 20, 2006

I'm submitting a form that contains the content for a page. I'm using (to avoid SQL injection attacks) $mysqli->real_escape_string($var).

Other forums have advised enclosing that with stripslashes() to avoid multiple slashes. That is not the problem - the problem is that the real_escape_string function is adding a to my input. How do I get these new lines out of here?

View 2 Replies View Related

Adds Newlines On The Top

Aug 29, 2006

I have a force-download script that should force a download of binary files. Now the weird thing is that nomatter what I try that it adds 2 newlines at the top of the output. The files are binary image files like jpeg and eps, but also some documents.

//database connection
//SPE class library
//Application general configuration file
if(!intval($_REQUEST['fileid'])>0) header('Location: ?content=library');
$fileinfo = lib_get_fileinfo(intval($_REQUEST['fileid']));

View 2 Replies View Related

Streaming CSV Always Adds UTF-8 BOM?

Apr 5, 2010

The following code gets a 'report line' as an array and uses fputcsv to tranform it into CSV. Everything is working great except for the fact that regardless of the charset I use, it is putting a UTF-8 bom at the beginning of the file. This is exceptionally annoying because A) I am specifying iso and B) We have lots of users using tools that show the UTF-8 bom as characters of garbage.

I have even tried writing the results to a string, stripping the UTF-8 BOM and then echo'ing it out and still get it. Is it possible that the issue resides with Apache? If I change the fopen to a local file it writes it just fine without the UTF-8 BOM.

header("Content-type: text/csv; charset=iso-8859-1");
header("Cache-Control: no-store, no-cache");
header("Content-Disposition: attachment; filename="report.csv"");
$outstream = fopen("php://output",'w');


View 3 Replies View Related

Regular Expression Filtering - Mimicking Expression Engine's Template Parsing?

Oct 14, 2009

I'd like to mimick (reproduce) Expression Engine's fantastic template parsing method. (Pls don't ask me why not using it :))While i'm able to find and parse simple tags like

{example_param = "param_value"}
i cannot parse tags where closing tag added:

View 2 Replies View Related

Unwanted Url Info

Aug 19, 2006

I have included session_start() function in the heder file which is included in every page in my site. Now i see some sort query string


at the end of the page url. why this is automatic inclusion occuring and how to make url's free of this kind of unwanted query strings?

View 2 Replies View Related

Regex - Regular Expression - What Kind Of $string Match This Expression??

May 11, 2011

What is purpose of the following code?

preg_replace( '@<(script|style)[^>]*?>.*?</\1>@si', '', $string );

What kind of $string match this expression? Why there is a character @?

View 4 Replies View Related

Loop That For Example Adds 1 (like 4 + 1) To A Colums

Oct 12, 2005

I want to set up a loop that for example adds 1 (like 4 + 1) to a colums in a row, and then adds 1 to the same column, at the next row, when the it comes to the last row, its starts over again..

View 1 Replies View Related

Htmlentities Adds Slashes - Why?

Jul 16, 2005

I'm using Apache/1.3.28 (SuSE 7.1, kernal 2.4) with PHP/4.3.2. I have the
following code to help cleanse form data.

function cleanData($sourceData, &$cleanData)
{ foreach($myData as $fieldName=>$fieldValue)
{ if(strlen($fieldValue)>0)
{ $cleanData[$fieldName]=htmlentities(trim($fieldValue)); }
{ $cleanData[$fieldName]=""; }


cleanData($_POST, $formData);

I tested the code and found a was placed before double quotes
automatically - I have had to use stripslashes to clean the offending
slashes but I was wondering why they appeared the first place. A view
source of my html code, via my client browser produced the following (until
I used stripslashes which removed the slashes).


What is the recommended action here? Is it something I need switch off in
php.ini or is it safer for me just to continue and use stripslashes as part
of my function?

View 3 Replies View Related

Email Render - It Adds The Tag <br> After Each Tag?

May 24, 2011

I send HTML email, everything is ok except that it adds the tag <br> after each tag.

Before sending

<div>Content 1</div>
<img src="http:[url]....
<div>Content 2</div>

After sending

<div>Content 1</div>
<img src="http:[url]... [code]....

why it is adding the br tag????

View 1 Replies View Related

Function That Adds 2 Time That Are During The Day

Sep 3, 2007

is there any one out there that know the best way to add 2 times together including over midnight.

i am using a function that adds 2 time that are during the day.

i am not to sure how to get it to work if i have say 18:00 to 00:30.

the function that i have got works with whole hours and not part hours i'e' 00:15, 00:30, 00:45. Code:

View 8 Replies View Related

Fread() Giving Unwanted 's

Dec 10, 2001

I am using the following line to read a file

$contents = fread ($fd, filesize ($filename));

I edit the $contents in a textarea and send it through a form in a string and when it writes the new string to the file it adds 's.

for example:

<FONT FACE=\"BankGothic Lt BT\>Click Back on your Browser to return to the Item Description</font>
<P><IMG SRC="A-01-0041z.jpg"

Can someone lead me in the direction to find a way to remove these slashes? a function?

View 2 Replies View Related

Additional Unwanted Characters

Feb 21, 2002

I have a PHP email list system, and it has suddenly stopped working properly. What is happening is when it attempts to scan the list for already subscribed email addresses it is not recognizing any of them as there. When I us VI in Linux to read the list file, I see an extra character at the end of the line "^M", what the heck is this character? The lines which add email addresses to the list use the following:

fputs($FilePointer, "

I beleive the ^M is a hard line break, but when I use the same fputs in another script it doesn't include that ^M, any ideas where this is coming from? I might be able to get it to workout if I could figure out how to replicate the ^M, but it isn't the actual characters ^M, it looks like when you push Ctrl and a letter, but when I puch Ctrl and M it creates a line break, and no ^M.

View 5 Replies View Related

Random Unwanted Html

Jul 17, 2005

I am getting two > characters and i really can't understand why they
are there -


It is driving me mad - here is all the code, sorry it's long

I'd appreciate it so much if someone would tell me why i'm getting
this error.

---the code----

<P>Please fill in all fields below (fields marked * are optional)</P>
<form action="landlordAddedProperty.php" method="post"
enctype="multipart/form-data" name="form1">
<table width="100%" border="0" cellpadding="10" cellspacing="5"
<tr class="fill_in_table_header">
<td colspan="5"><strong>Status</strong></td>
<tr class="fill_in_table">
<td colspan="2"><strong>Live in landlord</strong></td>
<td colspan="3"> <select name="status" class="formLabelText">
<option value="NULL" selected>Choose situation</option>
<option value="landlord">I am a permanent resident of this
and will rent out my home to student(s)</option>
<option value="empty">I want to rent out this property as an
empty property
to Westminster students</option>
<tr class="fill_in_table_header">
<td colspan="5"><strong>Location</strong></td>
<tr class="fill_in_table">
<td colspan="2"><strong>First line of Address</strong></td>
<td colspan="3"> <input type="text" name="address_first_line">
<tr class="fill_in_table">
<td colspan="2"><strong>Post code</strong></td>
<td colspan="3"> <input type="text" name="post_code"> </td>
<tr class="fill_in_table">
<td colspan="2"><strong>Town</strong></td>
<td colspan="3"> <input type="text" name="area">
eg. Kenton, Camden</td>
<tr class="fill_in_table">
<td colspan="2"><strong>London location</strong></td>
<td colspan="3"> <select name="location" class="formLabelText"
<option value="NULL" selected>Choose part of London</option>
<option value="North London">North London</option>
<option value="North-East London">North-East London</option>
<option value="East London">East London</option>
<option value="South-East LondoE">South-East London</option>
<option value="South London">South London</option>
<option value="South-West London">South-West London</option>
<option value="West London">West London</option>
<option value="North-West London">North-West London</option>
</select> </td>
<tr class="fill_in_table">
<td colspan="2"><strong>London Underground station

View 2 Replies View Related

Unwanted $string Portion

Feb 11, 2006

How do I strip put part of a string variable where, for example:

$string =

and I want:

$string = unique/folder/file.htm

View 2 Replies View Related

Stripping Unwanted Characters

Jun 4, 2007

I know there must be a simple way of doing this but I just can't find it. I am developing a system that allows users to upload word docs and download them. The upload script uses file_get_contents() to convert the file into a string and store it in a database for full text searching. The users never actually see the text - its just used to ascertain the relevance of the word doc before they download it.

The problem is that before and after the main text I'm getting random characters. Any ideas how I can strip these away? Example: ....

View 4 Replies View Related

Unwanted Users With Ip Address

Apr 6, 2005

I'm using php with mysql. I have a site where I have been banning unwanted users by using their ip address. I have found that an ip address can be used by more than one member. Is there a more efficient way to single out a particular user other than using an ip address.

View 12 Replies View Related

Unwanted Space Between Divs?

Feb 28, 2010

I am trying to get three images to connect for my content box but for some reason there is some space between the second and the third. here is the site: [URL]

<?php get_header(); ?>
<div id="content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div <?php post_class();?> id="post-<?php the_ID();?>">
<div id="mythreedivs">
<div id="top">

View 4 Replies View Related

Unwanted Caching Of Web Page

Apr 14, 2010

I have a problem of web pages being cached even though I specify that it should not. Take the simple example :

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
print date("Y/m/d H:i:s");

Hitting refresh several times in my browser indicates that this page is not reloaded as the time stays the same. It will eventually refresh if I keep on hitting the refresh button in the browser. Where could this page be cached and how can I avoid it? I'm using Apache 2.2.15, PHP 5.3.2 on openSuse 11.2, and my testing browser is Firefox 3.5.7 on the same machine.

View 1 Replies View Related

Unwanted Text Showing Up

Jun 21, 2009

I have this code which works fine but for some reason it is showing "> on the screen but it isn't supposed to be there?


View 1 Replies View Related

Unwanted Text Showing Up?

Jun 21, 2009

I have this code which works fine but for some reason it is showing "> on the screen but it isn't supposed to be there?

<?php if ($pageNum_Recordset1 >= $totalPages_Recordset1) { ?>
<form action="test.php">[code]......

I am guessing it is the "> at the end of this code block but if I take that out my page layout completely changes?

View 6 Replies View Related

Preventing Unwanted Access

Sep 12, 2007

I am creating a website, but there are two vulnerabilities that I can not seem to patch. I have a directory (/data/uploaded), this directory contains uploaded files which currently can be accessed (if someone figures out the directory) through the URL bar but I don't want them to be. The only way that these files should be accessed is by a .swf file.

The second issue is: I have a .php file, this script is accessed by a .swf file, I don't want it to be accessed by anything other than the .swf file as it contains some sensitive information.

What ways can I solve these issues? I've seen similar questions posted when I searched the forums, but I've never seen an answer that has solved the problem. I hope I have better lock .

View 3 Replies View Related

How To Stop Unwanted Characters

Oct 31, 2009

I am trying to only allow a-z and 0-9, it works fine. But the problem is if the user types @ or < or other characters it will remove them from the form but they still end up in the database. Is there a way to fix this problem? Can I only allow numbers, letters, and whitespace into the database with phpmyadmin or is there something I am missing?

<textarea name="comment" rows="10" cols="35" /><?php echo htmlentities(preg_replace('/[^A-Za-z0-9s]/', '', $saved_comment), ENT_QUOTES); ?>

View 5 Replies View Related

Convert Javascript Regular Expression To PCRE Expression?

Mar 18, 2010

I am up to my neck in regular expressions, and I have this regular expression that works in javascript (and flash) that I just can't get working in PHP

Here it is:

var number
= '(?:-?\b(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\b)';
var oneChar = '(?:[^\0-\x08\x0a-\x1f"\\]'
+ '|\\(?:["/\\bfnrt]|u[0-9A-Fa-f]{4}))';
var str = '(?:"' + oneChar + '*")';...........

Here's what happens if I try using preg_match_all():

Warning: preg_match_all()[function.preg-match-all]: Compilation failed: nothing to repeat at offset 0 on line 88

View 2 Replies View Related

Nl2br( ) Function Adds Extra Br

Oct 13, 2001

I recently installed phpDev4 (apache, php and MySQL) for local staging of web sites before uploading to my "online" web account. I have a script that takes a field from a database and converts new line characters to <br /> using nl2br( ). I downloaded a csv table from online MySQL and loaded the csv into my local MySQL for testing purposes.

When I run this script from my online account, everything is fine. However when I run this script locally php generates an extra <br />with double quotes and a number at the end of the field data. online html ex. this is a paragraph whose <br /> newline characters are converted to the break xhtml tag.

local html ex. this is a paragraph whose <br /> newline characters are converted to the break xhtml tag."<br />6". Why is "<br />6" added on the end? Is there something within php.conf file that I need to change?

View 3 Replies View Related

Fwrite, When Saving Adds / All Over The Place

Aug 7, 2005

having issues trying to save a .html file using the fwrite command. A copy of my post is below Ok currently ive got a index.php which opens up a .html file and imports that html into the tinymce text box, there i can easily edit the html file and then click save.

When doing save in php i use the fwrite command to write the contents of the text box to the .html file. Code:

View 3 Replies View Related

Adds A Space To The Beginning Of The Entry

Oct 17, 2005

I am working on a content management system and i notice that one field in a table (the 'text' field) adds a space to the beginning of the entry on every save, not a huge deal.

View 1 Replies View Related

Adds A Cookie To The User's Computer

Sep 16, 2007

I have the following code that checks a cookie for a particular number (a game's ID number). If it finds the number, it tells the user that they have already rated the game. Otherwise, it adds the user's rating and adds a cookie to the user's computer with the game's ID number in it. Code:

View 6 Replies View Related

Magentoo Adds Slash To File_name?

Jun 17, 2010

I try extend an core class.
But catch error:
Warning: include(
\\\\\.php) [function.include]: failed to open stream:...

Why magento add slashes to addres? May be config error?

View 1 Replies View Related

Fputcsv Adds Database Columns Twice?

Jun 24, 2011

I'm querying a database and trying to put the data into a CSV file. I'm using PHP's fputcsv function to make things simpler. It adds the data to the file no problem, but each column's data is written twice. For example, if my query returns 4 columns, it writes 8 columns (each column twice in succession). I've looked over's documentation on the fputcsv function a couple times now and I cannot see

PHP Code:

if($handle = fopen('endusers.csv', 'w'))
$query = "SELECT * FROM endusers NATURAL JOIN signups";
$result = mysql_query($query);


I've verified that the SQL query is pulling the correct data because I use the exact same query just before this code to display the data, plus I've used it in phpMyAdmin and it retrieves the data correctly (plus the tables are very simple). I've also tried removing the while loop and just adding a single row but the issue occurs then, too.

View 2 Replies View Related

Search Form That Adds New Rows

Jul 16, 2010

I wrote a search form for a database but I would like the user to be able to add sequential rows with an add button. I have tried it a couple of different ways but haven't gotten the results I am looking for. Is this something that can be done in PHP or should I be using Javascript?

View 3 Replies View Related

Xml - Automatically Adds Slashes To Quotes?

Jan 17, 2011

All I'm trying to do is to get xml file content, show is in the textarea and update the file content if the for is submited. I use this code:

$fname = "../data.xml";
if (isset($_POST["update"])) {

View 5 Replies View Related

A Function That Adds Quotes To A String?

Feb 21, 2010

Is there a function in PHP that adds quotes to a string?

like "'".str."'"

This is for a sql query with varchars. I searched a little, without result...I do the following:

$id = "NULL";
$company_name = $_POST['company_name'];
$country = $_POST['country'];[code]....

View 4 Replies View Related

Clicks On Item One Or Two, And It Adds It To The Cart?

Jun 29, 2010

How do I make like this: Someone clicks on item one or two, and it adds it to the cart. So say I added Item One to my cart two times, and Item Two to my cart three times. The session should (this is what I want it to do) look like this: 1-1-2-2-2I'm trying to achieve this via the explode function.

$item_1 = "Item One <a href='loops_test.php?add=1'>Add Item</a>";
$item_2 = "Item Two <a href='loops_test.php?add=2'>Add Item</a>";


View 3 Replies View Related

Edit File Actually Adds Instead Of Editing?

Apr 19, 2010

I'm working on a admin file to edit a plan however my editplan.php file actually adds a whole new plan duplicating the the existing plan. Can someone please have a look at my code to see where I am going wrong.

Here is the code of my editplan.php file:

// Connects to the database
$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if (isset($_POST['submit'])) {


View 4 Replies View Related

PHP Automatically Opening Unwanted Sessions

Jul 6, 2003

I used this tutorial and IT worked smoothely.. But when I added Links to each page, I noticed a crud load of numbers like so:


IT seems that it is opening a Session, Even though I gave it no Orders to open a session anywhere. Is there any code I can add to prevent the session from opening. I don't want to turn off sessions in my php.ini because I am using yabbse forum boards which relies on sessions.

View 2 Replies View Related

Does This Auth Script Have An Unwanted Loop?

Nov 1, 2006

Found the below script in a book I am reading.

However it seems to me to fatal flaw that if you run it but type in the
wrong the details, you're basically buggered. As far as I can see, whatever
is initially entered into PHP_AUTH_USER and PHP_AUTH_PW are stored and then
compared against the database. However #10 simply looks for the presence of
data in PHP_AUTH_USER and PHP_AUTH_PW, finds something and compares it
again in a loop you cannot break out of.

/* Program: Auth.php
* Desc: Program that prompts for a user name and
* password from the user using HTTP authentication.
* The program then tests tests whether the user
* name and password match a user name and password
* pair stored in a MySQL database.

//Testing whether the user has been prompted for a user name
if (!isset($_SERVER['PHP_AUTH_USER'])) #10
header('WWW-Authenticate: Basic realm="secret section"');
header('HTTP/1.0 401 Unauthorized'); #13
exit("This page requires authentication!"); #14
} #15

// Testing the user name and password entered by the user
$user_name = trim($_SERVER['PHP_AUTH_USER']);
$user_password= trim($_SERVER['PHP_AUTH_PW']);
$connection = mysqli_connect($host, $user, $passwd) or die("Couldn't
connect to server."); #24
$db = mysqli_select_db($connection, $database) or
die("Couldn't select database.");
$sql =
"SELECT user_name FROM Valid_User WHERE user_name = '$user_name' AND
password = md5('$user_password')";
$result = mysqli_query($connection, $sql) or die("Couldn't execute
query."); #31
$num = mysqli_num_rows($result);

if ($num < 1) // user name/password not found #33
exit("The User Name or password you entered is not valid.<br>");
} #37
} #38
// Web page content. #39
include (""); #40

View 1 Replies View Related

Unwanted Results From A Recursive Function

Nov 18, 2002

I have a recursive function within a class that is suppose to piece back together a passed in string. The string has been split into an array that holds each word.

If the "new" string is shorter than maxlength (141) than add the word and a space onto the returnString string. Otherwise, place the returnString into an array that will hold each string for later use, set the returnString = "", and recall the function.

Once I create the first part of the regrouping together and set returnString to "", I only get NULL back from the function. So I realize that there is a problem with that line of code, but I don't understand how to set returnString back to a string of length zero so that I may make another string out of it. PHP Code:

View 5 Replies View Related

Unwanted URLs In URL Dropdown Menu

Sep 7, 2001

I'm working on a PHP script and it has a user login, and the variables (username, password, id number) are passed via the URL bar. Is it possible to somehow not allow the visited page show up in the dropdown list of URLs in the browser? The problem is that people can view the list and easily see people's usernames and passwords. Example: What I only want is:

I know that doesn't show all of the pages that have been visited, all it shows in the list is, so I think it is possible to do this, but I don't know how.

View 1 Replies View Related