Search found 18 matches

by mjr
Tue Nov 26, 2002 9:06 am
Forum: PHP coding => General
Topic: Header problem
Replies: 1
Views: 1363

Re: Header problem

Hello, all php pro. I did this <html> <head> <title> </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php $id=$_GET['id']; switch ($id) {case 'home': header("Location: home.php"); break; case 'story...
by mjr
Tue Nov 26, 2002 9:04 am
Forum: PHP coding => General
Topic: Us newbies need some help!! >.<
Replies: 2
Views: 1055

Re: Us newbies need some help!! >.<

We're trying to do the following: Say you have an input box, and the user types something in it and is prompted with a pop-up window with buttons "yes", "no" and "cancel", asking if he/she wants to save the changes... if user clicks yes, pop-up window will close and user will be returned to parent ...
by mjr
Tue Nov 26, 2002 9:01 am
Forum: PHP coding => General
Topic: String manipulation question
Replies: 12
Views: 5278

mmm, I was sure that there was a php function... Can you explain the way it works?? For example, the common sample in all php manuals, which I tried to understand so many times before but finally getting bored --> $patterns = array ("/(19|20)(\d{2})-(\d{1...
by mjr
Tue Nov 26, 2002 8:58 am
Forum: PHP coding => General
Topic: php and html forms
Replies: 9
Views: 3533

Re: php and html forms

sxrxnnrr wrote:i cant get to work a simple html form with php...
i can't see any of the information introduced in the html form...it just shows an empty page

can you give a sample of code u use?
by mjr
Sat Nov 23, 2002 4:04 am
Forum: PHP coding => General
Topic: Function Scope
Replies: 1
Views: 910

Re: Function Scope

ricocali wrote:How do I call a function from another ".php" file without having to "include()" that file in the current ".php" file?


why include() function does not suit you?
by mjr
Sat Nov 23, 2002 3:57 am
Forum: PHP coding => General
Topic: Link Problem
Replies: 1
Views: 1350

Re: Link Problem

Hello all php pro I am having some problem, when i type goto.php?id=home in my browser, the page that pops up uses the goto.php title which is GB' rather that the suppost home.php title which is home.Why? Is there any better function than include to open a new page? Below are my codes for goto.php....
by mjr
Fri Nov 01, 2002 9:18 am
Forum: PHP coding => General
Topic: HTML to PHP converter
Replies: 7
Views: 2759

Re: HTML to PHP converter

Does anyone know of a utility that can convert a page written in HTML into PHP with echo statements. e.g. <tr> <td> <img src="myfile.jpg"> </td> </tr> would become: echo "<tr>"; echo "<td>"; echo "<img src="myfile.jpg">"; echo "</td>"; echo "</tr>" at the press of a button? sametch like t...
by mjr
Fri Oct 25, 2002 10:02 am
Forum: PHP coding => General
Topic: dinamic array in a while loop
Replies: 0
Views: 1140

Re: dinamic array in a while loop

use <html><body> <? $path = 'images/'; $counter=0; $counterStart = 0 ; $counterEnd = $counterStart + 16 ; $img=''; $imgTotal=0; $dir_handle = @opendir($path) or die("Unable to open $path"); while($file = readdir($dir_handle)) { if (substr($file, -3) == 'gif') { $imgTotal++; $counter++ ; if ($counter...
by mjr
Fri Oct 25, 2002 9:58 am
Forum: PHP coding => General
Topic: Text File Updating
Replies: 0
Views: 1035

Re: Text File Updating

use such command sequence: <?php $file = "summary.txt"; $fp = fopen("$file","w"); fputs($fp, $_POST["mytext"]); fclose($fp); ?> <? $stuff = implode("",file("summary.txt"));?> <form method=post> <textarea name="mytext" cols="50" rows="20"> <?php echo (htmlspecialchars($stuff)); ?> </textarea> <br> <i...
by mjr
Fri Oct 18, 2002 10:42 am
Forum: PHP coding => General
Topic: Need help with shoutbox
Replies: 2
Views: 1169

Re: Need help with shoutbox

try to use foreach() instead of for(). it might help
by mjr
Fri Oct 18, 2002 10:37 am
Forum: PHP General
Topic: ini files & application scope variables
Replies: 2
Views: 1416

Re: ini files & application scope variables

Hi, I'd like to know what is the best/good way to deal with custom ini files? So far I used parse_ini_file() but the problem is the data in the ini file is always the same – there is no point of reading it again and again. For example - I have my custom error handler that has such ini configuration...
by mjr
Mon Oct 14, 2002 3:05 am
Forum: PHP General
Topic: I wantto display the output ACTION prog. on same sreen
Replies: 2
Views: 1760

Re: I wantto display the output ACTION prog. on same sreen

I wantto display the o/p ACTION prog. on same sreen Normally with command <FORM METHOD=POST ACTION="addhotel.php"> the control is shifted to "addhotel.php" and whatever messages I want to display are displayed on next page. I donot want this to happen...I want to display the outcome of "addhotel.ph...
by mjr
Mon Oct 14, 2002 3:03 am
Forum: PHP General
Topic: form submission problem
Replies: 2
Views: 1528

Re: form submission problem

We're experiencing an intermittent problem: Submitting a form (via SSL, i.e. encrypted connection) from a php-built page to a php-based script which accesses MySQL. We get an apparently-instantaneous "Page not found... Cannot find server or DNS Error" error (m:\WINNT\system32\shdoclc.dll/dnserror.h...
by mjr
Mon Oct 07, 2002 6:17 am
Forum: PHP coding => General
Topic: Feedback form error checking
Replies: 2
Views: 1088

Re: Feedback form error checking

My simple php script checks for blank form fields and sends a header to reload the form if a blank field is found. This results in all the correct data being lost and the user has to start again. A "Click the back button" message works but I want to return the user directly to the blank field and r...
by mjr
Fri Oct 04, 2002 6:54 am
Forum: PHP coding => Mail
Topic: Auto response to e-mail and know there is somem message
Replies: 1
Views: 1973

Re: Auto response to e-mail and know there is somem message

I have a site say abcd.com I want to send an e-mail whenever i received an e-mail to this site (auto response. and also send an auto reply to my regular e-mail account notifying me that some e-0mail has been received !! Please help !! With regards Vikas Athavale look at imap_* functions in php - th...
by mjr
Fri Oct 04, 2002 6:50 am
Forum: PHP coding => General
Topic: PHP LOGIN FORMS
Replies: 2
Views: 1389

Re: PHP LOGIN FORMS

Can Sumone Please Tell Me How To Make A PHP Login Form~? make html form like <form action="test.php"> Login: <input type=text name=frmLogin><br> password: <input type=password name=frmPassword> </form and then in test.php <? echo "Login is $frmLogin; password is $frmPassword"; ?>
by mjr
Fri Sep 27, 2002 8:09 am
Forum: PHP coding => General
Topic: Switching Content in HTML Template?
Replies: 0
Views: 1173

Re: Switching Content in HTML Template?

Hi- I've been through about 10 tutorials that never finish quite in the way I'd expected them to. I'm looking for a way to bring html content files from separate directories to a variable in my main html template to be displayed. This way I can have a header.inc, a footer.inc and a content variable...
by mjr
Fri Sep 27, 2002 6:47 am
Forum: PHP coding => General
Topic: difficult calculation
Replies: 1
Views: 1197

Re: difficult calculation

Here's my problem: every 50th visitor gets a present. But I don't feel like emptying my table everytime I reach 50. Visitor nr. 100 or 2050 should also get the message: you are visitor 50! And visitor nr. 103 should get: you are nr.3 ! I wrote down how i want to calculate this: result1 = actual vis...