-
Posts
6,906 -
Joined
-
Last visited
-
Days Won
99
Everything posted by ginerjm
-
While I agree with trq's opinion on the job of being a programmer, I'll give you a hint. How about you add a field to your task record so that only the user that created it can update it?
-
Your css classes need a period in front
-
You needn't have posted all that code.... The error is telling you that the script you want included is NOT where you are saying. Perhaps the folder structure on this server is not in line with the structure on your old one. Anyway - it's simply a path issue.
- 2 replies
-
- phpdirectory
- require_once
-
(and 1 more)
Tagged with:
-
You put the CSS code in the right place in your html page? And you replaced the styles in the font tag with the $cls var? Perhaps you could post those same parts of your code with the changes you've made?
-
Since you are not making yourself very clear, I'm going to take a wild guess. You have an entire site(application?) that I presume you wrote. That's good. Now you want to prevent anyone else from accessing your entire site(application?) if one person is already on your site(application?). Is that what you are saying? Because that's the way it sounds and if true, it seems like a rather bizarre idea. Perhaps you could clarify?
-
If you're happy, I'm happy.
-
You haven't learned much since your last post. So much wrong with your code. and your coding. 1 - you should not be doing a query inside of a loop. Look up the syntax for "where field in (....)" used in queries. 2 - you have to store the fetch'ed row into something, otherwise why do the fetch at all? It's like going to the well without a bucket. 3 - nice try to capture data from multiple rows by using the same name= value, but how do you recognize which row the input comes from? You probably want to use the format "name='placeinline[]' which will create an array of values in the POST array. You have a lot of catching up to do. Suggestion? Stop using upper- & lowercase in your var names. It's going to catch up to you one day. One mis-typed char and you're going to be searching for an error for a long time.
-
convert entire php/html page to dowloadable pdf
ginerjm replied to Kova_Llano's topic in PHP Coding Help
I picked up fpdf and figured it out. It's not that hard - reminds of the days when I used to program Cobol and had to lay out reports by hand and then program to fit the layout. -
PHP / MySQL Users Display as a Thumbnail Grid
ginerjm replied to davidfattore's topic in PHP Coding Help
Then go for it! -
PHP / MySQL Users Display as a Thumbnail Grid
ginerjm replied to davidfattore's topic in PHP Coding Help
Alright. I assume that you know how to set up the html since you have already done. The only part you need to do is learn how to write a MySQL query and to choose the php interface that you will use to access the db. Since MySQL_* functions are deprecated, your have mysqli or pdo to choose from, depending upon which your hoster supports. The plan: 1 - write a query 2 - connect to your db and run the query 3 - check that it ran 4 loop thru the data and build your html code with the fields of each record you have retrieved. Here's a brief template using the PDO extension. $q = "select image_name, thumbnail from my_table"; $qrslts = $pdo->query($q); if (!qrslts) { echo "Could not run query"; exit(); } while ($row = $qrslts->fetch(PDO::FETCH_ASSOC) { echo "<div id='mythumbnail_div'>" . $row['thumbnail'] . "<br>" . $row['image_name'] , "</div>"; } You'll need to code the css to describe the div you need and modify the column names here to match yours, but this is the idea. You'll need to do some research on db connecting too but there are lots of examples in the manual. Sample css: #mythumbnail_div { position:relative; float:left; width:???px; margin:10px 10px; } I don't know what you mean by " inside an AP Div Tag 980px wide". -
PHP / MySQL Users Display as a Thumbnail Grid
ginerjm replied to davidfattore's topic in PHP Coding Help
So - it sounds like you have everything figured out. What kind of help are you looking for? -
convert entire php/html page to dowloadable pdf
ginerjm replied to Kova_Llano's topic in PHP Coding Help
Good luck. I looked a couple years ago and could not find anything. -
Looks like jquery to me. Try a different forum perhaps?
-
convert entire php/html page to dowloadable pdf
ginerjm replied to Kova_Llano's topic in PHP Coding Help
?? I think you are saying you want to create a pdf out the html on your screen. (There is NO php on your client screen, only HTML). Using fpdf you create the pdf from your data in a php script without using html. Fpdf has several functions that you use to output your data according to how you want the pdf to appear when done. Then you output the new pdf file to a separate screen (target) or else be sure you do not send any other output to the current window. -
Spending an awful lot of time on something your teacher explicitly ruled out. You doubted that the sort() function could work? So - now let's see how you tackle how your instructor wants it done.
-
PHP / MySQL Users Display as a Thumbnail Grid
ginerjm replied to davidfattore's topic in PHP Coding Help
What do YOU mean by thumbnail? Is this data in the form of an image? -
Not laughing.
-
This last chunk of dis-associated code does not make sense. The quoting alone is a big problem. Can you provide a LITTLE more code from above and below this? AND please post it with the proper tags for this site.
-
If you know where the problem is how about only posting the relevant portion? I know I'm not going to pore over 200+ lines of code for you.
-
Sounds like you are where you want to be. The hover and accompanying text display as well as the click to a larger image are a POC - with JavaScript. Please tell me that you didn't store any images in your db. Not recommended at all.
-
1 - nxt time use proper tags to post code snippets here. 2 - your guess at grabbing the 'basic' input s/b: if (!empty($_POST['basic']) $basic = $_POST['basic']; Required or not, you should be grabbing all the field inputs, sanitizing them and validating them before using them.
-
Two things. 1 - your call to mail() is invalid. Missing the required header arg. 2 - To send an html email you have to have headers indicating such.
-
Are you sure your own mail provider hasn't got it blacklisted?
-
Put this code in the header section of your html. <style type='text/css'> .color1 { color:red;} .color2 { color:yellow;} .color3 { color:green;} </style> Then do this to generate your display Note the lack of a font tag since that is SO old and deprecated. $val = intval(100 * $row['win'] / $row['played']); if ($val < 40) $cls = 'color1'; elseif($val > 60) $cls = 'color3'; else $cls = 'color2'; $val = $val."%"; echo "<td align='center class='$cls'><b>$val</b></td>"; Note change from single to double quotes on outer pair.