Jump to content

rbvinc

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by rbvinc

  1. Premiso, Thank you for the reply. I am not familiar with php blobs. Help me. I could not follow. I did the following code, and my pdf files are under, C:\Inetpub\wwwroot\newsa\testpdf Error on line #8, foreach (glob($dir . "/*.pdf", $file)) <?php foreach (glob("/newsa/testpdf/", GLOB_ONLYDIR) as $dir) { $folder = explode("/", $dir); $folder = $folder[count($folder)-1]; echo $folder . "<br />"; foreach (glob($dir . "/*.pdf", $file)) { $file = basename($file); echo "<a href='$file'>$file</a><br />"; } } ?> Thank you.
  2. I need some help please. I am looking for sample code, or links to do this. I want to display folders, and files in each folder. I want to put 'href" for each file. These are pdf files. Thank you for the help in advance. Folder_A, <a href='a.pdf'>a.pdf</a> <a href='b.pdf'>b.pdf</a> <a href='c.pdf'>c.pdf</a> Folder_B <a href='aa.pdf'>aa.pdf</a> <a href='bb.pdf'>bb.pdf</a> <a href='cc.pdf'>cc.pdf</a>
  3. rbvinc

    PHP form

    Continuing on previous reply, I tried northwind access database, it works fine with php (windows 2000/access 2000/php), I tried <?php phpinfo() ?>, this works fine. Only the above email problem, and mysql connection. I cannot connect thru php, but I can see dbs, tables, thru 'navicat' mysql editor.
  4. rbvinc

    PHP form

    I tried what you said 'xyz', no luck still blank screen.
  5. I am trying to do the following, instead results, I am getting blank screen. Can somebody please advise me. I have two files below, form-calc.php, calculate2.php Thanks, /// form-calc.php, <HTML> <HEAD> <TITLE>Calculation Form</TITLE> </HEAD> <BODY> <FORM METHOD="post" ACTION="calculate2.php"> <P>Value 1: <INPUT TYPE="text" NAME="val1" SIZE=10></P> <P>Value 2: <INPUT TYPE="text" NAME="val2" SIZE=10></P> <P>Calculation:<br> <INPUT TYPE="radio" NAME="calc" VALUE="add"> add<br> <INPUT TYPE="radio" NAME="calc" VALUE="subtract"> subtract<br> <INPUT TYPE="radio" NAME="calc" VALUE="multiply"> multiply<br> <INPUT TYPE="radio" NAME="calc" VALUE="divide"> divide</P> <P><INPUT TYPE="submit" NAME="submit" VALUE="Calculate"></P> </FORM> </BODY> </HTML> // filetwo - calculate2.php <?php if (($_POST[val1] == "") || ($_POST[val2] == "") || ($_POST[calc] == "")) { header("Location: calculate_form.html"); exit; } if ($_POST[calc] == "add") { $result = $_POST[val1] + $_POST[val2]; } else if ($_POST[calc ] == "subtract"){ $result = $_POST[val1] - $_POST[val2]; } else if ($_POST[calc ] == "multiply"){ $result = $_POST[val1] * $_POST[val2]; } else if ($_POST[calc ] == "divide"){ $result = $_POST[val1] / $_POST[val2]; } ?> <HTML> <HEAD> <TITLE>Calculation Result</TITLE> </HEAD> <BODY> <P>The result of the calculation is: <? echo $result; ?></p> </BODY> </HTML>
×
×
  • 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.