-
Posts
6,906 -
Joined
-
Last visited
-
Days Won
99
Everything posted by ginerjm
-
Combine 2 elements from 2 different arrays to same record
ginerjm replied to PHP_Idiot's topic in PHP Coding Help
good luck -
PHP Fields Logic & Math (input & Select fields)
ginerjm replied to studgate's topic in PHP Coding Help
You're being rude to a guy who is trying in the worst way to understand your vague technical details ( at least they are supposed to be technical details) and wondering what you are talking about? What the H... is "unlimited textfields"? Is that some new html tag that I don't know about? What is a "select field"? Is that a field for input aka - 'input' or is that an html "select" field? Your very loose usage of programming terms is making your English request for help hard to fathom. Is that clear to you? -
The message is telling you that you have the wrong path to that module. "It can't find it!"
-
PHP Fields Logic & Math (input & Select fields)
ginerjm replied to studgate's topic in PHP Coding Help
You need to be specific about your use of terms. Are we talking about "input" fields or "select" fields? Very confusing. How about deciding on your terms and re-posting your question. -
Haah!! Didn't even notice that.
-
PHP Fields Logic & Math (input & Select fields)
ginerjm replied to studgate's topic in PHP Coding Help
1 - what is an 'unlimited textfield'? 2 - what is a 'select field'? You show examples of how you want some (input?) fields to be dependent on other fields, yet your 'rules' for those dependencies make no sense. For ex, you say 'so if there are 6 'student name' entries, the select options will be 0,1,3,4,5,6,7'. Why "1,3,4,5,6,7" and not "1,2,3,4,5,6"? Perhaps you just need to re-read your post and try again? -
You have marked this as anwered - what was the answer?
-
Combine 2 elements from 2 different arrays to same record
ginerjm replied to PHP_Idiot's topic in PHP Coding Help
I have no idea what you are trying to do here but your methods seem bizarre. You take one array and make another out of it - what was wrong with using the first array in both cases? -
I don't understand your usage of $args. In the pdo section you do this: bindParam(array_values($arg)[0], array_values($arg)[0], PDO::PARAM_STR); My understanding of 'array_values' is that you get an array of the values contained in the input array. So that means you are grabbing the first value of the input array and in this case you are using that value as both the parameter name and the parameter value in the query. Is that what you mean to do? I guess I need to see what your incoming array of '$args' looks like. Perhaps you mean to do this: foreach ($args as $k=>$v) bindparam($k,$v);
-
what makes you say "there is a logic error"?
-
How to make the Log-In Form disappear after succeeding
ginerjm replied to Chrisj's topic in PHP Coding Help
You do realize that things that 'appear' on your screen are being put there by You, ie, Your Script. So - if you don't want them to appear, Don't Send Them. -
How to make the Log-In Form disappear after succeeding
ginerjm replied to Chrisj's topic in PHP Coding Help
1 - you displayed a form 2 - the user typed in credentials 3 - the user 'submitted' the form to your validation script 4 - your script validates and ??? What do you want to do after the user is logged in? Send him to a 'start' screen? Send him to the screen he attempted to go to before he logged in? Whatever it is at step #4 is when you send something to the client again to give the user something to work on. If it's the method you need to use, you can do this: $url = 'somescriptname'; header("Location: $url"); // some browsers insist on this exact format exit(); -
Do I understand that you are trying to remove a password from a session variable, as in $_SESSION['pswd'] ? 1 - Why in the world would you store a password anywhere??? 2 - Both the $_SESSION and $_SERVER arrays are spelled as I just did - all uppercase. That could be the root of your problem.
-
See my answer to your other post on the other forum you posted it to.
-
Try adding php error checking (in my signature) to see which lines are giving you errors and the messages.
-
Why do you wrap your query args in parentheses? Are you really seeking an email of (me @ domain . com) or do you want me @ domain . com? (Spaces added by me) And why do you do two queries? This s/b all done with one query. And you should be using some kind of security to scramble your password and not be storing it in your db un-scrambled. Plus - why make your db connection before you are sure to need it? Plus - you should really check the query results before fetching a row - there might not be any rows there if the query fails.(You should always verify that the query ran before checking for row count or fetching results)
-
Not sure I understand your last post. But my question still remains. What is Your Problem?
-
ok - I think I follow your problem 1 - you need a map from every room to every other possible room 2 - you have them all on your phone? Or in each room as a qr code. 3 - I'm guessing that when a picture is scanned and it is not part of the inventory for the room you are supposed to be in that your it then knows what room you are really in and can then give you a new map. But what if I want to continue on in the mistaken room? 4 - So What is your problem? PS - as Barand said - if the user can't read the maps and get to the right room, why bother?
-
Try FPDF too. Pretty easy to learn with a little playing around.
-
how about just talking about what you want to do in more general terms? We don't have a clue about what your goal is here so we can't follow your intimate description of it. Speak in general terms and walk us thru your idea.
-
What mac_gyver says is true but..... Looking at your category values I find it hard to call your database "categorized" at all. The values you have in the 'title'' column are certainly very disjoint and do not make for good analysis of your data in meaningful groupings. I mean you have "accident", "adorable" and "adventure". What do there have in common that they should be values of a single column? It is beginning to look like a dictionary of simple words which as you already stated will take days to comprehend and make sense out ot. Perhaps you need to re-think your database structure. Or maybe give us an idea of what you are doing. As an example of what I mean how will you treat a record that has a title of "accidental adventure" or "adorable acrobat"?
-
It still would have been nice if you posted the error message.
-
You originally you wanted to skip Fall 2014 once August started - not finished. Plus once Jan 2015 arrives you will never encounter Fall 2014. So my example does exactly what you asked for for the Fall date, but you haven't said how you want to handle Jan 2015. Describe the time period - exactly - that you want to use to exclude Spring. As your description reads now, one will never see Spring for the current year. Is that what you want? If so you don't have to do anything to exclude it since the first one that can ever show up is the Spring for the following year which is not a problem according to you. So my post should do what you want.
- 5 replies
-
- date exclusion
- date
-
(and 3 more)
Tagged with:
-
for ($y=0;$y<5;$y++) { if ($y==0) if (Date('m') <7) echo '<option value="Fall '.($year+$y).'">Fall '.($year+$y).'</option>'; echo '<option value="Spring '.($year+$y+1).'">Spring '.($year+$y+1).'</option>'; } This seems like it would eliminate the first occurrence of Fall once July has passed. We need more info on your Spring condition though. You do realized that once January has begun your initial $year value will not be 2014 again, so basically all dates will be > Jan 2015
- 5 replies
-
- 1
-
- date exclusion
- date
-
(and 3 more)
Tagged with: