Biggjoe's Posts
Nairaland Forum › Biggjoe's Profile › Biggjoe's Posts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (of 18 pages)
Long time, people ![]() Mr. Gem: Happy birthday! |
royalicon:assuming you know about POST and GET method of passing parameters and you used the POST method in your form, What i will do first is capture the studentID from the form in a variable like this: $text_StudentID = $_POST['studentID']; and then do this to the query: $query = mysql_query("SELECT * FROM DB WHERE StudentID ='".$text_StudentID."'" ;Note on bolded parts: after the = sign, the texts in bold goes thus: single quotes ('), double quotes(" , a dot (.), the variable($text_STudentID), another dot (.), another double quote(" and then another single quote('). |
![]() |
Thats what I call a cheap shot, your apologies didnt change much of the way we see your post -- cheap advert! |
Jona, You are not good at all at igbo bashing. you should learn from some people on this forum first. |
How to Display a Default Image when the field is Empty Now to do this, I employ simple logic which is what every programming is all about. To achieve it, I actually place the default picture or text just beside the image placeholder that returns the database pic and then instruct Apache to show it when the 'filename' database field is empty. Does that make sense? Let me come again, the default picture will be just side by side with the main picture but I will use the show/hide region behaviour to hide it any time the filename field has a text inside it. I will do something similar to what I did before but first I will insert default image or text into the DW page and then highlight it (highlight only the default picture or text) Now, Go to 'Show region' >> 'Show if recordset is empty' at this point, a small dialogue box opens again showing you the list of your created recordsets. Select your image recordset which is still rspics. When you have clicked ok, DW will pump in the following codes (code6) before and after the default image or text. The default image or text will sit in between the two lines of code below. Code6: <?php if ($totalRows_rspics == 0) { // Show if recordset empty ?> <?php } // Show if recordset empty ?> when you place the default image or text inside them you have: code7: <?php if ($totalRows_rspics == 0) { // Show if recordset empty ?> "Default Image or text" <?php } // Show if recordset empty ?> We now have to tell the code to ignore DW authors ( yet again!! super we!!) We now edit code7: and we will have: Code8: <?php if ($row_rspics['filename'] == ' ') { // Show if recordset empty ?> "Default Image or text" <?php } // Show if recordset empty ?> Thats it!! We have now given the page enough powers to show the DB image when you have something inside the database filename field and again show the default image or text when nothing is inside it. Thats how I did It. This could be subject to malfunction if your database field was designed to have default text. I think I have to stop here for now. Hmm na waa ooo. |
I said I will be back in a minute but its almost an hour, I think I underestimated what it takes to prepare a tutorial. Before I start, I need to add here that there are other ways of doing this but I will stick to Dreamweaver, afterall thats what the topic suggests. I will assume that: 1. you know how to create recordsets in dreamweaver and, 2. you know how to display image from the recordset. (displaying image is different from displaying other data in DW) 3.you are not a slowpoke. ![]() Let me help a bit with displaying image assuming you have created a recordset for returning it. We assume that 1. the recodset you created is named: 'rspics' without the quotes. 2. the database field which holds the name of your uploaded files is named: 'filename' again without the quotes. 3. the picture was uploaded to a folder named 'files' (no more quotes blah blah blah unless you are a retard. )Go to 'Insert' >> 'Image' On the dialogue box that pops up check the 'Data Sources' and your recordset(s) will appear inside the dialogu box. Expand the recordset which holds your pic and locate the the field that holds the filename. Click on the filename field and click OK, There it is, the code for your Picture will be inserted into your cursor position. The code that will appear asumming you are using the previously mentioned rescordset name will be: code1: <img src="<?php echo $row_rspics['filename']; ?>" The code above returns the picture as if it resides in your main web folder but that is not likely. (who does a stpid thing like that anyway) Now you have to make the code link the full path of the image which we have agreed was uploaded to the folder named 'files' go to the code1 above and add " files/ " to make it become code2 below: code2: <img src="files/<?php echo $row_rspics['filename']; ?>" If you have a picture file in that folder that is referenced in the Databse with the 'filename' then you have displayed your image! Run your page on a live apache server if you doubt me. i think I deserve a bottle of Gulder for this ![]() Now dont get excited, you only displayed a picture, any PHP fool can do that. Showing and Hiding the image under certain Conditions This is the fun part. This is where the Dreamweaver Sho/Hide Region Server Behaviour comes handy (after editing the original DW code of course) Lesson Continued, If you switch to Design View of your Dreamweaver, you will see what they call image placeholder in place of the code for displaying image. Common sense name abi? Now use your mouse and select this image placeholder and while it is still highlighted, Go to ' Application' pane on your far right of DW window, Click on the Server behaviour Tab and click on the + button>> Go to 'Show region' >> 'Show if recordset is not empty' at this point, a small dialogue box opens showing you the list of your created recordsets. Select your image recordset which in this case is rspics. When you have clicked ok, DW will pum in the following codes (code3) before and after code2. Code1 will sit in between the two lines of code below. Code3: <?php if ($totalRows_rspics > 0) { // Show if recordset not empty ?> <?php } // Show if recordset not empty ?> when you place code2: inside them you have: code4: <?php if ($totalRows_rspics > 0) { // Show if recordset not empty ?> <img src="files/<?php echo $row_rspics['filename']; ?>" <?php } // Show if recordset not empty ?> We now have to tell the code to obey us and not DW authors ( it feels nice to know you can actually do that) We now edit code4: and we will have: Code5: <?php if ($row_rspics['filename'] != ' ') { // Show if recordset not empty ?> <img src="files/<?php echo $row_rspics['filename']; ?>" <?php } // Show if recordset not empty ?> We have just told PHP or is it apache to show the picture if (the database field filename is not equal to empty) That is to say that the picture must be shown as long as there is a text inside the filename field. This can get tricky if you have designed your database to takee a default text when nothing was inserted to it. But I hope you wouldnt, How to Display a Default Image when the field is Empty This is getting too long so let me continue in another post, |
@rudie, If you have not solved your Show default pic wahala using dreamweaver holla me. I used to think that things like that arent possible with DW until I learnt to edit the DW 'show region server behaviour codes'. That will do the magic for you. I will come back shortly and see if I can put you through with working dreamweaver codes, A minute plz, |
are you guys looking for SMF pack or a hard coded forum pages. If you are looking for SMF then you should know where to find it but if you want everything hard coded, there are many people people in here who can do it, mua inclusive ![]() |
Let us not jump into conclusions yet, this is naija and this might possibly be another way of paying him back for stepping on big toes! |
carlinks:i will pretend you refered to me as sunny_bang and then add that my email is there now. |
Like I said before You can get very fast internet connection in nigeria. Fast as compared with what you have in the west the only thing is that its not cheap at all. If the ISP is in Nigeria, just forget it. They are all playing 'the more you look, the less you see' to Nigerians. Mine is coming from Canada. Its kind of business secret for me where I am so I cant give u details here, but for the spirit of open source in nairaland, I can give you all the details you need to get going with them if u holla me. Check my profile. Besides, any smart person can get these things off the internet. I dont know why People do underestimate google soooooooo much. There are loads of good ISPs you can hook up from here in naija. However, remember its VSAT and you need VSAT equipments to do it. All the the equipments will cost you about 250k if you are going for new ones but if you can get fairly used ones, you might be talking about 100k range. |
famous4u:Dont let dual core convert you to an OS sect that you might not like. He might just be having personal issues with Bill Gates and his family, thats all. ![]() Unless he is saying that he prefers windows XP sp2 to Vista which I will totally agree. |
how i wish you guys will not always jump on any pervert that comes here only to bash igbos for fun. you guys only end up making his/her day by doing so. |
Theres a new forum for corpers and ex corpers, Click the link below: http://excorpers.com NYSC bye Laws will help you in and out of Orientation Camp, Click the Link below to read all of it: http://excorpers.com/bye-laws1.html |
Na waa o Dual Core, Which one be good OS again? Is vista not good enough? |
There are many foreign providers offering very fast internet services in Nigeria, the problem is that Nigerians cant pay for it. My ISP is based in Canada and the bandwith that I use that people refer to as being fast is not even half way to the top of their highest bandwidth they offer yet it is about fastest in town. But the thing is that I pay dearly for it. It is not even a dedicated bandwidth. So my friend, it is only a dream in Nigeria if you cant pay for fast enough bandwidth. ![]() |
shouldnt it be echo "<a href=\"xyz.com\">Click</a>"; |
@[i]lazy[/i]wealth, website powered by javascript as dhtml said is not fun and i will add not secure and dynamic. dynamism is everything and we all know how easy it is to goof javascript since its clientside. again, i think you are trying to derail this tutorial with your adverts. everything around here has been given free so far and i think you should emulate dhtml et all and stop asking people to call you. From the much you you have said so far, I dont think dhtml needs anything from you neither do i, i am also good with php and asp myself. |
THAT PICTURE IS NOT REAL!! Photoshop at work. Cant you guys see it? Check their neck regions and the way their hands are aligned, it doesnt fit well. Look behind their ears and tell me whaere the shadows are coming from considering the background. Just take a closer look. Though its not like the three cant take picture together but this one is FAKE!!! |
presido1:Please people how do 'we face the reality things' things. |
The most unfortunate thing about this incident is that it will be hard for anybody to prove anything. Nobody knows the name or might even recognize the bloody soldiers. Nobody again can prove that the guy was taken to police station because the police will now as it has been that he is dead deny ever knowing of such situation. We might just start with 'we are still investigating the matter' statement from the police and end up with that ' the guy is an armed robber felled during a shoot out with patrol police and robbers on okada' It happens everyday. |
The colleagues of the dead guy will never let the policeman go free. Whenever he is out in the clear, they must surely take their own shot. Thats the army I know, they never forgives! Its just like the Mafia. |
ElRazur: ElRazur:how can you just say for sure they arent mad and how would you know if the guy did something else. for them, he has already done something by putting on something green enough. If you know how mad soldiers can get when they see a civillian on something that resembled military uniform then you wouldnt be saying that they arent mad nor say that the guy did something. |
sage:why not profer some solutions if not, your own reaction too is equally shocking. |
And what i have noticed is that even though this thread is on page 2, no one has come up with any good reason to tell me that Dora is such a bad person with reference to what we read on the available article on this thread. Unless you are telling me that there are other things she has said or done abot Ekiti and mama REC that was not on that article. Let us not judge her because of the people she is working with/for whom we have all presumed has a hand in Ekiti election rigging. |
My point in all these is that from the post I saw on this thread, I have not seen what Dora said as being soooo bad for people to be calling for her head. She shouldnt have attacked the lady at all because the Mama did not say that the pressure was coming from the Federal government which Dora represents. But my question remains: Is not possible that Dora's Oga who is Mr. President has no hands in what happened in Ekiti on saturday? To me, it is very possible and even most likely. I have read an unconfirmed report elsewhere that Yaradua is being pressured to make Oni the Governor by any means necessary but he refused saying that due process must be followed. No look at it this way again. If the Yaradua is so bent on making oni Governor at all cost, is this resignation not his opportunity? He will simply get another person he trusts and make him/her the REC and before you know it the election will be carefully rigged. Again, From other reports I have read on this nairaland, the election rigging carried out in Ekiti on saturday all took place inside Ekiti and it wasnt the type of election rigging we are all used to. If there was a presidential connection in the rigging, there wouldnt be any single violence and yet it will be rigged. It happened in anambra in 2007 and Andy Uba became governor and no one could do anything about it. Lets not see every evil at state level as having a federal connection. THATS MY POINT! |
chidichris:If the news articles that Kobojunkie posted is the one that made people call for Dora's head then I believe that it is very uncalled for. Dora is an information minister. Government takes a position on something, she is supposed to affirm the position. Is it because its all about election and PDP. Is it not possible that the people in government can be right for once?! And why would somebody who cannot even spell her name correctly should stop telling us here that she is her hero and role model. ![]() |
have anyone here considered the possibility of contracting HIV through OKADA? ![]() Dont shout yet, its possible though very remote possibility. I have to go for HIV test weeks after being on an Okada on which the okada man wont stop shedding TEARS! He wasnt crying but I guess the high speed and no protection from direct wind impact was the reason for the tears. I know for sure I swallowed some of those tears and much more entered my own eyes. Wouldnt that be enough to contract AIDS in some case? I mean tears is bodyfluid and we all know HIV lives there. ![]() |
Oh! Looks like you are only talking about DW site setup. I even assumed you already know how to setup a site in DW. |
I cant understand exactly what XAMP will do differently for you on forum creation. if you wish to set up a forum like SMF. Just go to smf website, download the zip version. unzip it, then upload the folder into your webhost's root folder (for that u have to use file transfer client like WS_FTP or filezilla etc) and then after uploading all folder contents type your domain name/instal.php on your browser that will launch the installation file where you will need to input things like your database host,password, etc. you have to make sure however that while uploading that the smf folder structure is intact. I think your host will supply you with all those details or your must have created them yourself using their cpanel. Did i make any sense at all? |

is a form item that will use the studentID in the form as a basis of searching the dD among other items.
