-
Posts
6,906 -
Joined
-
Last visited
-
Days Won
99
Everything posted by ginerjm
-
Kicken solved this with one of his first comments: "an element that cannot be scaled down". I was making my body width to be 150% in order to fit somethings onto the page without overflowing. Once I stopped doing that and focused on making things fit the enlarged view ceased. I wrote this page several years before learning responsive css methods and never cleaned up a lot of old html. Now it's working. Thanks people.
-
I don't have any images involved. Just a bunch of divs that block out specific parts of the data that I am displaying which is plain text in p tags along with some html tables. During debugging every div has a border on it to help align my layouts. And the link from my menu that sends me to this script/page is nothing special. I'm hoping this is a situation that happens to anyone - just only on this page for me. I have pored over the css and html and can't see anything that I'm doing unusual. Trust me - it's actually a pretty simple page with much more non-PHP stuff than code. And - no JS code either.
-
Which is it - SURNAME or lastname? And - maybe it's just me and my style but I would write the query differently: $q = "select firstname, lastname from user_data where firstname='Fred' and lastname='Smith'"; This avoids the unnecessary concatenation and does the proper selection of the fields you need to receive rather than using the * to pull all the columns in.
-
The tag is in the Head section. And it works for all my other places; just not this page for some reason. I would show it but it is a complex page of displays of different paragraphs and data that are all setup down the page for the user to scroll thru as I enable/disable different blocks of them during the event I am managing.
-
You're checking if questionid exists but then saying 'no matching id' instead of 'Id is required'. That s/b changed Then you continue to run the script and try to work with the query results that YOU NEVER RAN. That s/b changed. In your second block of code you are showing us something BUT WHERE IS IT LOCATED IN THE FIRST BLOCK???
-
how to updat 2 tables in one database within one form?
ginerjm replied to PNewCode's topic in PHP Coding Help
Use the <> symbol to create a block for inserting code into a post. Makes for nice reading an it is clearer that's what it is. Why not sql1 and sql2 ? -
how to updat 2 tables in one database within one form?
ginerjm replied to PNewCode's topic in PHP Coding Help
And why haven't you posted any of these efforts? -
how to updat 2 tables in one database within one form?
ginerjm replied to PNewCode's topic in PHP Coding Help
You will have to write a separate query to update the other table. Be sure to check the first query is successful before doing the second one. And read up on how to do a prepared query since you are inserting user-generated data into your table which could corrupt your database. And - BTW - you would be better off if you learned to use the PDO interface instead of MySqlI. If you have access to it. -
A bit new to this CSS technique and am having an issue with a certain web page when viewed on my iphone. I click from my main menu to this page and it always shows up 'enlarged' on my screen. My laptop has no issues but my phone, using 'responsive css', has to be shrunk down to fit the content onto the screen. I also have to design the screen (for the iphone) to be 150% in width In the body I have: <meta name="viewport" content="width=device-width,initial-scale=1"> And in the css I have: @media screen and (max-width: 600px) I have been using this in many of my screens for the last year or so and have not had this issue so I"m stuck as to why and am wondering how to resolve this. Any pointers?
-
Have to ask. Do you have error reporting enabled in this script so you can see any error messages? error_reporting(E_ALL); ini_set('display_errors', '1');
-
Are you not a regular php programmer? It would seem to be true since you don't recognize what was wrong with the use of 'test' as an argument to the function call. Your use of 'test' as an argument is incorrect because your were trying to pass a word that has no meaning to php as a calling argument. You must pass a value or a variable of which the letters 'test' is neither. If you had used 'test' in quotes then it would be a string value and would work as long as the function was expecting a string value for that argument. And if you had used $test that would be a php variable and would not present a problem as long as it was the proper value (again) for the function to use.
-
Possible To Auto Generate Prepared Statements ?
ginerjm replied to TheStudent2023's topic in PHP Coding Help
You posted 'Imagine these 2 array' which was followed by a block of code that was nothing more than an array. Hence my confusion. About this and about what you are trying to do. IMO - by the time you write something that would accomplish what you seem to be describing you could actually write the code you are trying to avoid. -
Possible To Auto Generate Prepared Statements ?
ginerjm replied to TheStudent2023's topic in PHP Coding Help
What about writing the query statements? You're not worried about what the user chooses to inquire about, only how to handle the prepare function? BTW - box #1 in your post refers to 'these two tables' but all I see is an array definition (improperly written too) but no indication of different sources. And box #2 shows you doing a prepare using the same value for every column in a supposed query. How is that useful unless you are still working with a poorly designed database that has multiple identical attributes in a table?