-
Posts
6,906 -
Joined
-
Last visited
-
Days Won
99
Everything posted by ginerjm
-
so - why not mark this as answered???
-
An array reference must look like: $_array['indexname'] which you are not doing
-
How much "text" is there in a PDF file? The ones I've managed to look at are pretty much gibberish.
-
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?
- 1 reply
-
- str_replace
- php
-
(and 1 more)
Tagged with:
-
'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.
-
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?
-
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
-
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.
-
assign the session val to a regular php val OR wrap it inside {}
-
try adding some echos and see what is being captured. debugging is an essential part of programming.
-
Warning: Illegal string offset suddenly appearing!
ginerjm replied to PHP_Idiot's topic in PHP Coding Help
What is the actual error please... -
You are missing a closing single quote on your href= before you issue the closing double quote to concatenate the $row value.
-
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.
-
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.
-
Updating a menu list, without reloading older links
ginerjm replied to Gath's topic in Javascript Help
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? -
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?
-
The easy way Is to read up on "heredocs" in the php manual.
-
Help with creating directories/uploading files
ginerjm replied to babymac's topic in PHP Coding Help
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). -
filtering display results with check boxes
ginerjm replied to bluediamond's topic in PHP Coding Help
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. -
new to programming and have a problem.
ginerjm replied to Christopher_Peters's topic in PHP Coding Help
<td><a href="$f6">$f6</a></td> -
why can't you "order" the query results so that you don't have to do this jumping back and forth?
-
Have you ever programmed before??
-
Do you have error checking turned on? I'd be surprised if line 6 doesn't throw a warning or something. Anyway - line 6 is trying to typecast a simple variable as an array and assign it (as an array?) to a var called $test. But then the next iteration is going to do the exact same thing with the next row, so basically you'll end up with the last row's value in the var $test. Perhaps you should turn on error checking when you are developing. And as an answer to your woes, try doing this: $test[] = $row5['name']; This will give you an array have the contents of each 'name' field in it.
-
This sounds like a lack of understanding of database structure and normalized data. Add a table to hold this employment history - you will have multiple records for each employee. Be sure to have a common field between the Employee table and the EmpHist table so that you can link them together in your queries. As for processing the input form that has your html table on it, each column's <input> tag will have a name attribute on it such as 'name="ename[]"' and 'name="ecountry[]"' and 'name="efrom"' in the html and your php code will retrieve this data as an array - $ename = $_POST['ename'] which would create a php array called $ename. Do this for each input element name and then loop thru them all to collect each complete row of employment data and post each to your database.
-
Are you talking about having a table produced by html show up on your page correctly (an html problem) OR showing the contents of a database table show up in your script or on the screen via some php output function?? Can't help if you can't explain.