Jump to content


  • Posts

  • Joined

  • Last visited

sigung_q's Achievements


Newbie (1/7)



  1. Greetings all!! Just a quickie. How does one make audio automatically play when a browser enters the web page? I know how to put the audio player in place, but the user has to click on the play button for it to play. I'm looking for a way for the audio to play without user interaction. Thanx. SQ.
  2. Greetings all!! OK, so here's the original code line: <img class="xr_ap" src="member_album1_htm_files/564.png" alt="" title="" style="left: 0px; top: 0px; width: 1375px; height: 00001050px;"/> However, I use this, and other images from the same directory in quite a few other pages. However, those pages will not be in the same directory. So I changed the code line to this: <img class="xr_ap" src="c:/photo_album_lib/member_album1_htm_files/564.png" alt="" title="" style="left: 0px; top: 0px; width: 1375px; height: 00001050px;"/> Hoping to have one central repository of common graphics and style sheets. However, the browsers act as if there is nothing there. Is there a way to do this, or do I have to repeat copy everything into every directory for every page? If so, things are going to get very cluttered very quickly.
  3. Hi Justsomeguy, Yes, I tried it without the leading zeros, but no diff. I was aware of that earlier, and had tried it that way. Thanx though.
  4. Hi Davej, I tried what you suggested, by breaking it all out. It still acts the same. I can resize on Firefox, but not on IE. This is part of the code for a picture album of sorts. Another problem, is that as pictures are added, I have programmed it to push the other pictures to the right, and down rows as each row fills up. However, it doesn't seem to matter what coordinates I tell the pictures to take (left and top), they seem to get placed rather "willy-nilly" all over the page. I can place pictures statically with a web page builder, and they turn out perfect, yet when I use PHP to upload a picture, and it places the HTML code into the file for positioning the picture, the browsers seem to ignore it. I've even used winmerge to compare the code between the two, and it's identical. It makes no sense to me why one set of code works, and another set of identical code does not. I'm quite new at this whole HTML stuff, so please have patients. Any suggestions?
  5. Hi folks! OK, here's the scoop. I have the following code (which is part of a larger HTML file): <img id="pic_no3" onmouseover="expand_pic3()" onmouseout="norm_pic3()" class="xr_ap" src="member_album3_htm_files/picno2.jpg" alt="" title="Dashka sitting on a log." style="left: 0112px; top: 00000860px; width: 147px; height: 220px;"/> <img id="pic_no1" onmouseover="expand_pic1()" onmouseout="norm_pic1()" class="xr_ap" src="member_album3_htm_files/picno1.jpg" alt="" title="Amina in the hay." style="left: 0355px; top: 00000610px; width: 330px; height: 220px;"/><script>function expand_pic3(){document.getElementById("pic_no3").style="left: 0112px; top: 00000860px; width: 294px; height: 440px;"}function norm_pic3(){document.getElementById("pic_no3").style="left: 0112px; top: 00000860px; width: 147px; height: 220px;"}function expand_pic1(){document.getElementById("pic_no1").style="left: 0335px; top: 00000610px; width: 660px; height: 440px;"}function norm_pic1(){document.getElementById("pic_no1").style="left: 0355px; top: 00000610px; width: 330px; height: 220px;"}</script> Basically, this doubles the size of the photo when the mouse is over the photo, and when the mouse leaves the photo, it goes back to normal size. This works fine on Firefox, but not on IE. I'm thinking it may be some setups in IE, but not sure. Any thoughts anyone? Thanx in advance - Q. :-)
  6. I know I probably sound dumb, but I'm just learning this stuff. So if the seesion_start() sends output, and needs to preceed any other output, and the header() function sends output, and needs to preceed any other output, that tells me that the two functions are mutually exclusive at least on the same page, unless separated by some sort of if/else or case structure. Is this true? Having read through the articles you have cited, has just confused me even more than before. In the end, all I really want to do is retain some variables from a session, and use them as the web page(s) that I send the browser to. Is the header() function the wrong functon to be using? Is ther another one that gets along with session better? example: if A { header($_SESSION['gotolinkA']); } else { header($_SESSION['gotolinkB']); } This is all I really want to be able to do. It seems simple enough. I have a book as well that describes how to use the header() function, yet it doesn't seem to do whatever I read says it will.
  7. OK, so I simplified the script, and all I get is a blank page when I execute it. It appears that the header() function does not function. <?phpsession_start();session_write_close();if ($_SESSION['uservld'] == "yes") { header($_SESSION['userhome']); }exit;?> When I perform this script, I get the print out of the session variable: <?phpsession_start();session_write_close();if ($_SESSION['uservld'] == "yes") { printf($_SESSION['userhome']); }exit;?> The print out is: http://www.scontinuum.com/home So the printf() function seems to work, but the header() function does not. Although, I'm sure I'm still missing a piece of the puzzle here.
  8. Hmmmmm....... Thanx Foxy, I think this may be the missing puzzle piece. Because (as I understand it), session_start() sends a header, and that would make it and the header() function mutually exclusive. I'll let you know how it turns out.
  9. Davej, I have read that link you gave me before. I followed it to the letter, but as soon as I navigate to another page, the $_SESSION[] variables disappear. Here is the code I am wrestling with: <?php session_start(); $aok = 1; $username = $_POST['uname']; $emailaddrs = $_POST['emaila']; $remailaddrs = $_POST['remaila']; $passwrd = $_POST['pswrd']; $rpasswrd = $_POST['rpswrd']; if ($emailaddrs != $remailaddrs) { $aok = 0; } if ($passwrd != $rpasswrd) { $aok = 0; }if ($aok == 1) { $filename = "c:/load_new_mem/new_mem.nmb"; $fp = fopen($filename, "w") or die("Couldn't open $filename"); fwrite($fp, "$username"); fwrite($fp, "$passwrd"); fwrite($fp, "$emailaddrs"); fclose($fp); exec("c:load_new_memload_new.exe"); if (file_exists('c:load_new_membad_name.bad')) { printf("The user name you entered is not acceptable, please hit the back<br/>"); printf("button and try a different user name.<br/>"); $aok = 0; } if (file_exists('c:load_new_memdup_name.dup')) { printf("The user name you entered is already in use, please hit the back button and try<br/>"); printf("a different user name.<br/>"); $aok = 0; } if (file_exists('c:load_new_membad_pswd.bad')) { printf("The password must be between 6 and 16 characters in length, please hit the<br/>"); printf("back button and fix this.<br/>"); $aok = 0; } if ($aok == 1) { $filename = "c:/load_new_mem/".$username."_pages.pgf"; $fp = fopen($filename, "r") or die("Couldn't open $filename"); $_SESSION['userhome'] = fgets($fp, 256); $_SESSION['userbio1'] = fgets($fp, 256); $_SESSION['userprof'] = fgets($fp, 256); $_SESSION['useracts'] = fgets($fp, 256); fclose($fp); $_SESSION['uservld'] = "yes"; header$_SESSION['userhome']; } }else { if ($emailaddrs != $remailaddrs) { echo "Your emails do not match, please hit the back button and fix this."; } if ($passwrd != $rpasswrd) { echo "Your passwords do not match, please hit the back button and fix this."; } }?>
  10. Hi Just, OK, so if I "session_start()" on every page, does it retain the variables I assigned in the previous page?
  11. Hi there Mod. Actually, I'm tring to use the header function to redirect the user based on the conditions of an if / else statement. So far, I only get blank pages. The <a> element in HTML doesn't seem to work with either variables, or if / then statements. Also, I've tried starting a session, and it starts just fine, and remains just as long as the page that started it is up, but as soon as I navgate to another page, it seems to be destroyed. At least none of the $_SESSION[] variables are available anymore. Not sure what's going on, but it seems none of the php built in functions are operating correctly. Any help is much appreciated.
  12. Thanx Foxy. This looks like what I need. However, it doesn't actually open the page, rather it comes up with a message asking if I want to save the file, or open. When I choose open, it simply keeps coming back with the same message. It gets into a loop. What I'm tryng to do is load two different pages based on a conditional statement "if - else". I have yet to figure out how to do this. I know it's possible, as on the web, one can be redirected all over the place depending upon certain conditions. The <a> element doesn't seem to support "if - else" type statements, especially where variables are concerned.
  13. Is there a way to load a page in PHP? Similar to the <a href=...../a> statement in HTML.
  • Create New...