Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Everything posted by ginerjm

  1. Yes - you did say something else. You want to read a screen that is displaying the contents of a pdf. It took me all of 5 minutes to find out how to do it on google. I'll let you do the same.
  2. So OP - have you taken Psycho's advice and fixed your initial problems? If you have I hope you also have learned to turn on error checking, validate your inputs, and practice safe data updating. Your code is woefully lacking in any of those things and you are only asking for trouble down the road. Must each row contain all of these fields? You don't check for that. Also - since you are using arrays as your input values, you may have a problem with the last field - your datetime one, since you are not providing an array of values for it. You say there are no errors showing. Well since you don't run a query I can believe that, but without error checking turned on, you don't even know if your script has other errors. PS - is "size=20px" a valid attribute of an <input> tag? I think it's just "20". Looking forward to your next post.
  3. It's still a login system. The code that is triggered by the user when he selects the video needs to pass in the video name to your login script (which all selections will call). Your login script does the validation while saving the parm passed into it and once the user is cleared, you then call the "display" script passing it the parm with the video name to be displayed. Ex. html anchor tags (?) with the names of the videos (?) and an href like this: <a href="videologin.php?name=videoname1">videoname1</a> <a href="videologin.php?name=videoname2">videoname2</a> etc. In your login script $videoname = $_GET['name']; (do your code to display the login screen storing the videoname as a hidden field on that screen) (do your code to handle the input credentials and to check them) be sure to retrieve the hidden videoname: $vidname = $_POST['videoname']; then call your display script: Header("Location: displayvideo.php?name=$vidname"); In your display script: $videoname = $_GET['vidname']; (now do your code to put up a video player with the $videoname file) I would do this as 3 programs - one to show the video names for the user; one to do the login process; the third to do the video playing.
  4. You said in your other post to come here and work on this one. Yet - you have already been given the answer yesterday. Run with it! (A pretty simple fix it is too - maybe you DO need to do some reading)
  5. ginerjm

    php error

    An array reference must look like: $_array['indexname'] which you are not doing
  6. How much "text" is there in a PDF file? The ones I've managed to look at are pretty much gibberish.
  7. Yes - that section is what you think it is. So - if you have used "some" php, why not continue to use this part as well? His use of "?p=xxx" is not just the use of PHP, it is a standard url with a GET parm. Or are you looking for some php code to resolve the existing urls? Or are you done with this problem?
  8. 'javascript: alert('".$row['Mobile']."')>".$row['Name']."</a><br>"; Don't use an <a> tag to host your onclick, just make it a <span>. Also convert to a js function call like this. <script type="text/javascrpt"> function showMe(num,nam) { alert('For: ' + name + " Mobile #: "+num); return; } </script> in your html: echo "<span onclick='showMe(\"". $row['Mobile']. "\",\"" . $row['Name'] ."\")'>$row['Name']</span>"; Now you are just executing JS and not making any kind of html action.
  9. awful lot of code for a "stranger" to your appl to wade thru. Have you tried adding some debugging echo statements intermittently to see what's happening at various points with the data that you are having problems with?
  10. 1 You show the user a screen. 2 When he/she clicks a certain button you want a box to open up on that screen. 3 User puts data into box. 4 User clicks submit button and everything gets written to DB. Correct? Your request that item 2 has to happen with php makes your whole process a bit cumbersome for the user. Why not use JS to popup the box and avoid having to go to the server the extra time? If you insist, then you need to add code to your script to handle the first button's submit to redisplay the page with an additional html element on it. Then you need to have your script handle the second submit button properly. Pretty basic but not until you've done it once. Sample: <? if submit = "show popup" then get all the current input data fields from POST redisplay the page including popup box exit endif if submit = "Save" then get all the current data fields from post post the data redisplay screen without data(?) and msg indicating success exit endif
  11. turn on error reporting, set your error level to show all errors. (Yes - I know you''ll have to do some research first!) Also - try adding an exit() to end your script properly.
  12. assign the session val to a regular php val OR wrap it inside {}
  13. try adding some echos and see what is being captured. debugging is an essential part of programming.
  14. You are missing a closing single quote on your href= before you issue the closing double quote to concatenate the $row value.
  15. I think the problem is bad html. <p> tag does not precede the <body> tag (that I know of. The first td tag contains two select tags and a div and an input tag - an awful lot of stuff in one table element for some reason. I think having the div in the middle of the form creates problems sometimes. I know it's confounded me in the past.
  16. I think the best way is to get the poster to stop doing it! That said - I think you have to parse the text of the page and do your own thing to count start tags and end tags and skip the end tags when they outnumber the starts.
  17. If I understand you, you want to modify your "menu" as a results of some user interaction with your page. This and perhaps some database content involvement as well. If so - this sounds like an ajax thing wherein you make your call to the server, get the response and output that response to the html div or element that contains your menu. Does that sound right?
  18. I assume that you are using the next and prev buttons as 'submit' buttons. So - hide the next/prev ids in hidden input fields in the form with the buttons and retrieve them when you process the button. No?
  19. The easy way Is to read up on "heredocs" in the php manual.
  20. Hope you're still doing your homework and not waiting for someone to earn your grade for you. You have a lot of reading to do in order to learn some stuff. There are millions of examples out there in google-land on how to do this. You don't need this forum (yet).
  21. If you want people to read your code and understand, try doing some normalization to it. Remove the styles and use css. Format the rest of the text to make it more presentable. It looks like it was generated for you and probably even you doesn't know what it does (or does not) do. Then you might get someone (like me?) to read thru it and help.
  22. why can't you "order" the query results so that you don't have to do this jumping back and forth?
×
×
  • 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.