-
Posts
6,906 -
Joined
-
Last visited
-
Days Won
99
Posts posted by ginerjm
-
-
uhhh - please define 'no longer works'.
-
Since this is homework I'll simply tell you that you are missing a semi. Basic mistake - happens all the time.
-
You're using a pow function to calculate a payment amount? Seems odd.
The error is the extra comma in your first pow call.
-
Hard to make sense out of what you want with the incomplete code you provided.
Are you viewing this code in a browser or a text editor? You say 'view source'. Does that mean you are using the browser's 'view source' command? If so, a <br> will not cause a line break (at least not in IE) so if that is the problem, then you have a \n char in the code already.
I'm confused as to your reason for worrying about what the 'view source' gives you for format too. Why does it matter since most people aren't going to see this? Besides - removing the <br> and inserting the \n is going to ruin the html formatting of the page.
-
You ask:
I would like to setup something ... which will allow me to securely store usernames and passwords for accessing databases and remote servers without needing to have them stored in the file system.
Shouldn't username and passwords be coming from the users? And why would anything be stored in the file system when you have a db? If you want to access a remote server you could store the credentials in a table and let your appl go get it. That s/b pretty secure - especially once the user (?) logs in correctly.
-
Is this an sql question? Perhaps you want to try a different forum? Sounds like a situation for a CASE statement.
-
Uhhh, This is a forum where we help you with the code you are trying to write. So - you should take a stab at writing your idea in code and testing it asking for help in perfecting it.
btw
1 - your url should look use ampersands instead of + signs for the second and third parms.
As for the rest of your explanation of what you want to do, I'm a bit confused. Your url provides one value for each parm but you want to get "groups of divs" out of each one? Hmmm...
-
Creating a pdf is not that hard. Try FPDF - pretty easy to learn and powerful.
-
What is it?
-
Do these docs have to be Word docs when you place them on the server? Why not convert them to PDF format and then nobody can alter your source (Word) doc? Not sure but the PDF format may itself have a RO option so that no software can modify them.
-
I don't understand what you are asking. What's a database post that can be parsed?
-
Simply query the location table for the item id and the max date
-
Have you tried reading a manual on how to use the things you are trying to use? Just browsed thru all the posts here and it seems that you are learning PHP line by line as each forum member gives you an answer. Probably not the best way to learn technology.
-
In addition to Gizmola's advice I suggest that you do NOT store the actual image files (.jpg,.png,.gif, etc.) in a table. No need for that. Store the location/name of the image file in your record and save the image file in that place. If the images are going to be displayed on your html pages, then store them in the web-accessible tree.
As for your paths - if you have control over the images and directory structure I would keep the path to the folder(s) as a constant for your appl and just use a relative path in the record. Then when things get moved around for some reason you simply create a new tree and copy the old one under it and then modify the appl constant to point to the new location. All the relative paths in the records will still work just fine.
-
You cannot mix the use of mysqli_* and MySQL_* functions. Drop the latter since they are deprecated. See the manual
- 1
-
Where to start?
1 - post code in the forum properly using the tags as described in the rules.
2 - Learn at least a LITTLE bit about php - specifically that it is case-sensitive. That means that $_post['tracking'] is invalid.
3 - Turn on php error checking in all your scripts during development so that things like #2 show up as the errors that they are.
4 - When writing code put statements on separate lines. Makes reading them much easier as well as editing later on.
Yes - do as Barand suggested but also do try to do some of the things that I just posted before you post more code here. It will greatly help your cause.
-
Well, some of us don't look at other sites.
Can't imagine why you can't post code here.
-
If you post your code perhaps we can help you.
-
The language has a unique way of testing the readdir function? News to me. How many more functions must be treated this way? Is there a list of them?
-
if ($handle2 = opendir($dir))
{
while (false !== ($entry = readdir($handle)))
{
[\php]
You opened $handle2 and tried to read from $handle.
PS - you can write it like this:
while ($entry = readdir($handle2))
instead of the more complicated way you did it.
-
Commas, semis, periods, parens, curly braces, > symbols, typos/misspellings -all these are part of that great big world we call Programming.
-
As in your last post you continue to use non-standard array notation.
The index of an array element if not that of a numeric array needs to be in quotes.
$ar = array(); $ar[0]= 'first element'; ar[1]= 'second element'; echo $ar[0],'<br>'; echo $ar[1],'<br>';
produces and outputs a proper numeric array.
$ar = array(); $ar['first'] = 'first element'; $ar['second'] = 'second element'; echo $ar['first'],'<br>'; echo $ar['second'],'<br>';
produces and outputs an associative array.
If you read up on arrays in the manual you will see references to how PHP tries to interpret what you are writing. Indices that are non numeric and not in quotes will first be checked as a constant which is what the messages are telling you. I don't think that is what you are trying to do.
-
Save us all some time and SHOW us the final code that you are trying to test out. Then we can see it as you want it
-
I can't imagine that the thumbnails take up that much space. If the OP is saving the fullsize ones already (for possible use later on), the addt'l space is a fair tradeoff for the processing time the thumbnail conversion adds to the page load each time it is called upon
what am i doing wrong with the php code? how do i code this equation to calculate monthly payment?
in PHP Coding Help
Posted
To become a programmer you have to have an eye for detail. Look carefully at your lines and you will see your error.
As for the div by zero - perhaps you should check the incoming parms to your functions to be sure that they are valid or simply check the values to be used in your calc before using them.