-
Posts
6,906 -
Joined
-
Last visited
-
Days Won
99
Everything posted by ginerjm
-
Are we supposed to just figure out your entire view of the world from your post here? Yes - I use cpanel, or I should say, my host provider uses it. It's great for what it provides. But I am not forced to interface with cpanel for my own custom written apps. Why are you trying to use cpanel for your own purposes instead of your own self-written login system? That's what it sounds like from here that you are trying to do. Or is my hearing that bad from this remote portion of the world?
-
You have to remember that PHP only runs on the server so anything you want calculated either has to be done on the server and sent back to your form or you must use a client-side tool to do the calc and place it on the screen. That is usually JS. Pretty simple thing to do. Add an onblur or onchange call to the quantity field and have it call a funciton that does the calc and populates the extended price field.
-
I hate it when people embed php tags into their html code. Learn to write without having to do that. (just for grins - I use exactly one set of php tags in my entire scripts all the time) As for example 1 - should have worked I think. #2 tho is not gonna work since it obviously is not in php mode since there is no echo and therefore the variable won't be interpreted. Have you examined your web page when it loads to see how it looks onscreen?
-
Absolute paths that are driven by some static starting point such as DOCUMENT_ROOT as Requinix pointed out.
-
What kind of a tag is failing you? Is it similar to 'working' tags? Do you realize how silly your post is? We're programmers, not seers
-
How to transfer data from a variable to an another variable?
ginerjm replied to Fardin's topic in PHP Coding Help
"variable new_name"? Is that a separate and distinct variable or you are just simply not specifying the object name? -
And I apologize for placing your last variable with the 'display' portion of the link instead of as part of the class-list.
-
I am getting an error while creating the link.
ginerjm replied to maviyazilim's topic in PHP Coding Help
I suggest (strongly) that you begin a new post with a new title on it to ask your new question. That way you will get attention from those who have already passed over this topic. That's how forums work. -
I gave you a correct replacement for your problem line. I think. Try it and see.
-
I am getting an error while creating the link.
ginerjm replied to maviyazilim's topic in PHP Coding Help
Huh? We are showing you some PROPER 'code structures' so why don't you want to learn from them??? You are writing incorrect things that give you these errors and you ask for help solving them. Learn from what we give you, not some other method that you apparently do not know, hence the errors are arising. One of the best people on this forum gave you a solution and you SNUBBED him. Really? A guy spends his time to help you and you just flat out told him you didn't want his help. -
Perhaps $_SERVER['HTTP_HOST']?
-
Try this <?php echo "<a id='nav-panel' href='{$HOST}panel.php' class='w3-bar-item w3-button'>{$disabl}Diskuter</a>"; Are you sure it's not $_HOST?
-
What is $HOST?
-
I am getting an error while creating the link.
ginerjm replied to maviyazilim's topic in PHP Coding Help
You haven't seen code written like that which is perfectly normal, so "you can't use it"? What kind of nonsense is that? -
I am getting an error while creating the link.
ginerjm replied to maviyazilim's topic in PHP Coding Help
Was trying to make it clearer without so many quotes. Did I leave out an = somwehere? -
I am getting an error while creating the link.
ginerjm replied to maviyazilim's topic in PHP Coding Help
The short answer is: bad quotes: echo '<a href='icerik.php?=icerik' . $goster['icerik_id'] . ''>' . $goster['baslik'] . '</a>'; good quotes: echo "<a href='icerik.php?icerik" . $goster['icerik_id'] . '''>" . $goster['baslik'] . '</a>'; OR break it down into parts: $id = $goster['icerik_id']; $href = "icerit.php?icerik=$id"; echo "<a href='$href'>" . $goster['baslik'] . "</a>"; You also had errors in your href to begin with which I changed. -
I am getting an error while creating the link.
ginerjm replied to maviyazilim's topic in PHP Coding Help
wrong quotes -
So are you working or not? I'm not sure from your last post. Something that you are doing that I do not have in my connect logic. I am on a paid-for hosting service and the host spec is this: $host="mysql:host=localhost;dbname=$l_dbname;charset=utf8"; I have never used any actual server name for localhost. PS - you will note that the dbname is a variable here which is preset to null. When I do make a connection I usually supply the dbname that I plan on using as part of my call to my connection module.
-
And I learned something ELSE today!
-
Well following your example here is what I now have: $q = "SELECT a.wine_num, a.activity, date_format(a.date_posted,'%m-%d-%y') as date_mdy, d.activity_desc, a.bottle_cnt, a.my_comments, w.label, w.vintage, s.sort_col FROM mywines_activity a JOIN mywines_activity_codes d ON a.activity = d.activity_code JOIN mywines w USING (wine_num) LEFT OUTER JOIN (SELECT wine_num, CONCAT(max(date_posted), wine_num) as sort_col FROM mywines_activity GROUP BY wine_num) s ON s.wine_num = a.wine_num $sel_wine ORDER BY s.sort_col DESC, a.date_posted"; And it works. Thank you sir.
-
Correctly? Does that mean I am doing it incorrectly, despite all of the previous examples I have that worked?
-
Why doesn't this topic show up under the MySql Help forum? Did I not post it correctly?
-
Fatal error: Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'a.wine_num' in 'on clause' in /home/albany/public_html/homejg/wine_activity_review.php:106 Stack trace: #0 /home/albany/public_html/homejg/wine_activity_review.php(106): PDO->prepare('SELECT a.wine_n...') #1 {main} thrown in /home/albany/public_html/homejg/wine_activity_review.php on line 106 Line 106 is the call to prepare If I alter the first selected field name (the problem one) to an invalid one the error message points at that change. If I put it back and insert a new invalid name after the 1st, the error message will then point at that. Why point out a new 2nd field rather than the original 1st field, unless it is NOT invalid. Curious...
-
Having a problem with a query I am trying to improve with a Join. Here it is: $q = "SELECT a.wine_num, a.activity, date_format(a.date_posted,'%m-%d-%y') as date_mdy, d.activity_desc, a.bottle_cnt, a.my_comments, w.label, w.vintage, CONCAT(s.sort_date, a.wine_num) as sort_col FROM mywines_activity a, mywines_activity_codes d, mywines w LEFT OUTER JOIN (SELECT wine_num, max(date_posted) as sort_date FROM mywines_activity GROUP BY wine_num) s ON s.wine_num = a.wine_num WHERE $sel_wine a.activity = d.activity_code and a.wine_num = w.wine_num ORDER BY sort_col DESC"; The error is "a.wine_num" is not a column name. But - it is! It is actually one of the keys of table a and it is being using in several relationships here. The whole query works great without the join. I'm just to trying to add something to better sequence it.