Search found 1803 matches

by johnj
Sun Mar 20, 2011 9:20 pm
Forum: PHP coding => General
Topic: I'm sure this is simple
Replies: 2
Views: 809

Re: I'm sure this is simple

not sure what the issue/trouble/problem is?
by johnj
Sun Mar 20, 2011 9:17 pm
Forum: PHP coding => General
Topic: creating a dynamic histogram
Replies: 3
Views: 1321

Re: creating a dynamic histogram

You said that "histogram spans horizontally to represent the numbers." So, create a html table like: <table width="<?php echo $myWidth; ?>" height="<?php echo $myHeight; ?>" > <tr><td>Some number</td></tr> </table> Write a php code which will give $myWidth and $myHeight a value based on some conditi...
by johnj
Sun Mar 20, 2011 9:09 pm
Forum: PHP coding => General
Topic: Script not working - HELP!
Replies: 1
Views: 796

Re: Script not working - HELP!

First - Try a simple example: <form name='myForm' method='post' action='getFormData.php'> <input type='text' value='' name='fName' size='25'><br/> <input type='submit' value='Save' name='subbtn'> </form> php code for getFormData.php <?php $firstName = $_POST['fName']; echo "<br/>First Name = ".$firs...
by johnj
Sun Mar 20, 2011 8:30 am
Forum: PHP coding => General
Topic: Getting data from lines
Replies: 3
Views: 1083

Re: Getting data from lines

Code: Select all

$fp = fopen('yourtextfile.txt','r');
if ($fp) {
    while (!feof($fp))
    {
       // do whatever you want
    }
}
else {
    die("Unable to open file);
}
by johnj
Sun Mar 20, 2011 8:28 am
Forum: PHP coding => General
Topic: Getting data from lines
Replies: 3
Views: 1083

Re: Getting data from lines

Your question is vague. I am going to assume that by 'page' you meant html page.

Open the text file which is storing these data, read it line by line and then write the output to a new file(s) based on your criteria.
by johnj
Sun Mar 20, 2011 8:21 am
Forum: PHP coding => Mail
Topic: PHP Help
Replies: 1
Views: 731

Re: PHP Help

To achieve what you are asking - Suppose the hosting email address is foo@myhost.com, your email is a@myhost.com and the customer's email is b@myhost.com. Find the code which sends the email, in that change address for 'from' as 'foo@myhost.com', address for 'to' as 'b@myhost.com' (or the php variab...
by johnj
Sun Mar 20, 2011 8:13 am
Forum: PHP coding => General
Topic: iframe source which content is generated by php on another s
Replies: 16
Views: 2432

Re: iframe source which content is generated by php on anoth

You need to find what data(values for form variable) is getting posted. Then,use CURL to send/post that data.
by johnj
Sun Mar 20, 2011 6:19 am
Forum: PHP coding => General
Topic: Altering Attributes in a DOMDocument
Replies: 3
Views: 755

Re: Altering Attributes in a DOMDocument

Here is a piece of code that I wrote to maipulate 'href' xml file called myhtml.xml: <table width="100%" border="0" cellspacing="5" cellpadding="0"> <tr align="char"> <td width="70" scope="col" valign="top"></td> <td scope="col" valign="top" id="bodyCopy"> <p class="style1">MainBody</p> <p class="st...
by johnj
Sat Mar 19, 2011 8:55 pm
Forum: PHP coding => General
Topic: Encrypting multibyte character problem -- mb_substr guru?
Replies: 10
Views: 1565

Re: Encrypting multibyte character problem -- mb_substr guru

Are you sure that you are using the right character encoding when you are using mb_substr with multibyte languages?
by johnj
Sat Mar 19, 2011 8:44 pm
Forum: PHP coding => General
Topic: iframe source which content is generated by php on another s
Replies: 16
Views: 2432

Re: iframe source which content is generated by php on anoth

To get an html page in this case, use php curl. Then parse that html page source using built-in php string functions to get what you want.
by johnj
Sat Mar 19, 2011 8:38 pm
Forum: PHP coding => General
Topic: creating a dynamic histogram
Replies: 3
Views: 1321

Re: creating a dynamic histogram

If you are not comfortable with that class/package, then try to create a simple histogram using html table
by johnj
Sat Mar 19, 2011 8:29 pm
Forum: PHP coding => General
Topic: how to encode and decode multidimensional array in php?
Replies: 2
Views: 847

Re: how to encode and decode multidimensional array in php?

what is the exact result that you want? what is your input?
by johnj
Sat Mar 19, 2011 7:05 pm
Forum: PHP coding => General
Topic: Altering Attributes in a DOMDocument
Replies: 3
Views: 755

Re: Altering Attributes in a DOMDocument

You need to post the entire code - what does $xmldoc contain?
by johnj
Sat Mar 19, 2011 8:17 am
Forum: PHP Installation
Topic: Unknown characters
Replies: 0
Views: 1131

Re: Unknown characters

This looks like a wrong character encoding. Where does this happen - in your php editor or in the html page?
by johnj
Sat Mar 19, 2011 8:04 am
Forum: PHP coding => Images
Topic: Display image for .wav file while running
Replies: 13
Views: 2670

Re: Display image for .wav file while running

where do you want to place this image? In a php code?
by johnj
Sat Mar 19, 2011 7:54 am
Forum: PHP coding => General
Topic: Help Required with web form validation and php
Replies: 0
Views: 477

Re: Help Required with web form validation and php

You can write client side validation code in Javascript or you can do server side validation using php. If you use validation using php,one way to achieve this will be using regular expressions. You need to validate each fields separately. for example: a).To validate name field: $subject = 'J K Rowl...
by johnj
Sat Mar 19, 2011 7:42 am
Forum: PHP coding => General
Topic: URGENT Japan Quake website needs help
Replies: 4
Views: 1717

Re: URGENT Japan Quake website needs help

You are welcome Egami.
by johnj
Sat Mar 19, 2011 4:13 am
Forum: PHP coding => General
Topic: URGENT Japan Quake website needs help
Replies: 4
Views: 1717

Re: URGENT Japan Quake website needs help

Assuming that you have already created the database (let us call it japaneq) and the table called markers: Create a new folder/directory in your web root (let us call it japan or whatever you want ) a). Copy this file (phpsqlinfo_dbinfo.php) to this new folder: <?php $username="username"; $password=...
by johnj
Sat Mar 19, 2011 1:36 am
Forum: PHP coding => General
Topic: too many users can access the same file.
Replies: 14
Views: 2767

Re: too many users can access the same file.

@vijayayarra - I tested what you were complaining about (data loss) but I did not see any loss of data when the form variable name was an array. This tells me that the problem you are experiencing is due to something else. Here is the code that I wrote: html: <html> <head> </head> <body> <form metho...
by johnj
Sat Mar 19, 2011 1:06 am
Forum: PHP coding => General
Topic: URGENT Japan Quake website needs help
Replies: 4
Views: 1717

Re: URGENT Japan Quake website needs help

what is it that you do not understand ? Is it the php code used to insert data to table or the code that actually shows the map plus popup form?
by johnj
Fri Mar 18, 2011 8:47 am
Forum: PHP coding => General
Topic: not generating the log ID.
Replies: 1
Views: 492

Re: not generating the log ID.

what do you mean by " The problem is in 10% of the cases log is not getting generated. what could be the reason."? Do you mean that the auto inc number logID is not generated? LogID will be generated only if the insert was successful. Try displaying the query for each db call as well as display mysq...
by johnj
Fri Mar 18, 2011 5:57 am
Forum: PHP coding => Mail
Topic: Emailing a link
Replies: 2
Views: 809

Re: Emailing a link

Yes, if you can send the email in html format and the receiver can read the email in html format, then you will not loose the content between <a href> and </a>
by johnj
Fri Mar 18, 2011 5:51 am
Forum: PHP coding => General
Topic: how to encode and decode multidimensional arrays in php?
Replies: 1
Views: 667

Re: how to encode and decode multidimensional arrays in php?

There are several encode and decode functions in php - which one are you looking for?
Please take a look at these functions on http://www.php.net