-
Posts
6,906 -
Joined
-
Last visited
-
Days Won
99
Everything posted by ginerjm
-
If you want our help you have to show us something. Are these columns part of a table? Or are they separate items that you want to be lined up using div tags or something? Paste your code here so we can look at it and give you suggestions. And not all of your code - just the part that is failing you. No pictures either. Just code
-
1 - Do you have error checking enabled in this script? That could help point out some errors 2 - Would you be able to show some of this code - perhaps the first 100 lines - so we can see how it was styled and what obvious problems there might be? Don't want to see pages and pages of code. Just a portion to show how it begins and what may need to be altered right there. When posting code do a cut and paste and place it in the block that is opened up when you click on the <> logo in the post box. We can't do anything with a jpg or snapshot.
-
You do realize that all the input tags at the beginning are not being used since they are not part of a form tag?
-
Your first post gave the impression that there was only one record. How are you going to collect multiple records - with repeated form entries? And then run a different script that does as Barand suggests?
-
Create your html page and by echoing it <?php // $data= array("$quantity","$price","$total"); $tbl_data = "<table> <tr> <th>Qty.</th> <th>Price</th> <th>Total</th> </tr>"; $tbl_data .= "<tr> <td>$quantity</td> <td>$price</td> <td>$total</td> </tr>"; $tbl_data .= '</table>'; // now build the html page $code=<<<heredocs <!DOCTYPE html> <html lang='en'> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <style type='text/css'> #tbl_box { position:relative; float:left; margin:2% 5%; width:60%; font-size:14px; } </style> </head> <body bgcolor='#c0c0c0'> <center> <span>Page Title</span> <br> <div id='tbl_box'> <!-- the table data goes here in this div tag which you can adjust with the css code --> $tbl_data </div> </body> </html> heredocs; echo $code; // display the html page with the tbl_data buried in it.
-
How to show post title instead of single.php/Id=3 in URL
ginerjm replied to Rasheed4u's topic in PHP Coding Help
And who or what is creating that url? That would be nice to know if we are supposed to tell you how to alter it, don't you think? Do we have to pull this info from you or are you going to get to the point and help us to help you? PS - free hosting. You get what you pay for. -
So you want to see those vars that are 'local' which means they are not global. I, for one, have no idea why anyone would be writing code like this. But I can tell you that local vars are those that are limited in scope which mean they are probably in a user-written function and your use of these functions must happen inside of that function. And that is all I have to say. Bye.
-
How to show post title instead of single.php/Id=3 in URL
ginerjm replied to Rasheed4u's topic in PHP Coding Help
We would like it if you would assist by giving us some context. Without seeing ANYTHING at all about your code, how the heck are we supposed to help you. Geez! -
How to show post title instead of single.php/Id=3 in URL
ginerjm replied to Rasheed4u's topic in PHP Coding Help
Huh? Are you really asking this question? -
Same question I asked since I never even knew these functions were out there and had no needs of this kind. OP - your original code was almost perfect. That 'return' was causing an error for you and the fact that you had no locals defined gave you an unexpected empty answer. Your new solution is really unnecessary.
-
If you had error checking turned on you would see that the return is not supposed to be there. Plus I don't see any local vars being defined in your 'script' And just what are you trying to find?
-
PHP mail() function not delivering html form contents to my mail id
ginerjm replied to Swayamjit's topic in PHP Coding Help
And something else I just remembered. I do believe that if you are running a script that you must use a valid domain address as your 'From' one. You can't use abc.com as the From if you are using xyz.com as your hostname. -
PHP mail() function not delivering html form contents to my mail id
ginerjm replied to Swayamjit's topic in PHP Coding Help
Have to ask - Have you sent mail this way previously? PS - I would move the error checking settings to the top of your script. That way you will perhaps see some new errors that you missed by doing the settings late. And this is a bit easier way to provide your body content: $email_body = " Full Name: $name/r/n Email ID: $email/r/n Contact Number: $contact\r\n Subject: $subject\r\n Message: $message"; $email_body = " Full Name: $name\r\n Email ID: $email\r\n Contact Number: $contact\r\n Subject: $subject\r\n Message: $message"; -
Session not carried between sub-folder and root
ginerjm replied to stuartmarsh's topic in PHP Coding Help
AND AGAIN - A 12 YEAR OLD SHOULD NOT BE OPENED. -
PHP Sessions data lost when changing directory?
ginerjm replied to Ineffable's topic in PHP Coding Help
A 12 YEAR OLD POST REALLY SHOULD NOT BE OPENED UP. -
I do not understand what you are saying. The error will display in the html? Do you mean on your screen from our page? And what is the rest of this meaningless script suppose to be demonstrating to us? How about a bit more code to help us debug it for you?
-
I know the OP has 'asked'. We are here to help posters with problems with the code the write for themselves. Hence my last post - show us please.
-
So - just because 2 or more files have the same internal date you want to download them both even if they have absolutely nothing to do with each other? Seems like an odd thing to write.
-
OK - write some code and see what happens. Bye
-
While you are re-thinking this.... There are 3 functions related to the file date - filemtime, fileatime & filectime. Which one is the most important to your project? And how will you be sure that you are downloading the correct file since you could have many files having the same date/time value?
-
So why did you not tell us that and why show us a sample file with a date as part of the name? Do you want to begin this discussion again?
-
You showed us a sample filename that used a date value as part of its name. Isn't that how you want to identify files that your user wants to download? The filemtime function reads the date saved as part of the directory entry that represents the date/time of the last file change which isn't always visible. Step back and think about what you want to do. If it is the former I think I have given you the code to do that mostly. At least the identification part.
-
You said you wanted to use the date to identify the file by name. Now you are mentioning filemtime. Why? That is not what you first said.
-
So if you want to take a user's input of a valid date value and convert it to a text string to build the filename do this: $input_val = '12/01/22'; // sample value if ($dv = strtotime($input_val)) { $filename = date('m-d-y', $dv) . '.txt'; echo "For input of $input_val filename will be $filename<br>"; } else echo "Invalid date input: $input_val<br>"; Then you use the value created above ($filename) and do a search of your log folder like this: if (is_file($log_folder.$filename)) echo "Filename is in log<br>"; else echo "Filename $log_folder$filename not found in log<br>";
-
A sample filename would be helpful to us to help give you right code. And perhaps the script that you have already written if you are having problems with would be nice. As Barand said - we are not psychic