Solved

need more help

Posted on 2002-03-28
7
223 Views
Last Modified: 2008-03-06
hi again, thanks to those that have been helping me along the way with my script. i'm still coming up with problems heh.

ok here are the pages again:

the list page http://only.host.sk/sample_pk_list.html

to post to the list http://only.host.sk/sample_post_pk.html

the code http://only.host.sk/pklist_sk.txt

so far i been tinkering with it, and I think the problem with the slashes is all gone ( http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=php&qid=20278996 )

though, i can't test it anymore because i'm getting an error now

the problem with the spaces in the list page code is still there. after each post, the lines of code get more and more spaces when you view the html source of the list page.

also, i don't understand what the period . does in the code? how come $CRLF is used instead of putting /n at the end? still trying to understand this php stuff. (original cgi script http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=php&qid=20275170 )
0
Comment
Question by:sayhi
  • 4
  • 3
7 Comments
 
LVL 1

Author Comment

by:sayhi
Comment Utility
the error is:
Parse error: parse error in /mnt/host-users/only/cgi-bin/pklist_sk.php on line 32

also, you can post and test the pages out
0
 
LVL 5

Expert Comment

by:andriv
Comment Utility
Your error is on this line:

fwrite($fp,"<b>Name:</b> " . stripslashes($pkname) . stripslashes($pkacct) "<BR>" . $CRLF);

You need to add the dot before the break tag string:

stripslashes($pkacct) . "<BR>"

The dot concatinates the returned value of the stripslashes to the string value that follows and visa versa.  It is the concatinate operater.

The program you are using was created so it would be easy to edit, you can add the \n to the string if you wanted to:

stripslashes($pkacct) "<BR>\n");

0
 
LVL 5

Expert Comment

by:andriv
Comment Utility
You also have the same error on this line:

 stripslashes($myacct)"</b></font> <BR>" . $CRLF);


should be:

stripslashes($myacct) . "</b></font> <BR>" . $CRLF);
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 1

Author Comment

by:sayhi
Comment Utility
ah okay.

i wanted the paranthesis around accts so i did this:
stripslashes($pkname) . " " . "(" . stripslashes($pkacct) . ")" . "<BR>" . $CRLF);

that alright coding?

i still have that space problem

say the code on the list page was this:
<html>
<head>
<title>

after using the form, it'll change to this:
<html>

<head>

<title>

after a while, you end up having huge gaps in the code.
see source of http://only.host.sk/sample_pk_list.html
i need to use wordpad now to even view source because of all that extra space.
0
 
LVL 5

Accepted Solution

by:
andriv earned 50 total points
Comment Utility
-> stripslashes($pkname) . " " . "(" . stripslashes($pkacct) . ")" . "<BR>" . $CRLF);

The above is fine.

The problem with the extra spaces, it's in this line:

fwrite($fp,stripslashes($line) . $CRLF);

Every time it writes the html over again it's adding a new line for each line.  Remove thte .$CRLF

fwrite($fp,stripslashes($line));
0
 
LVL 1

Author Comment

by:sayhi
Comment Utility
wow it finally works right!! yah! heh

THANKS so much!
0
 
LVL 5

Expert Comment

by:andriv
Comment Utility
No problem, glad I can help.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now