denno020
Members-
Posts
761 -
Joined
-
Last visited
-
Days Won
3
Everything posted by denno020
-
Using "if" commands with 2 separate buttons / if statements
denno020 replied to mat420's topic in PHP Coding Help
Dude seriously... Here is the code again, read the comments in the code (they'll appear orange) //assuming left send button is called submitEmail and right is called submitContact if(isset($_POST["submitEmail"])){ //do the form processing for the email submission part }else if(isset($_POST["submitContact"])){ //do the form processing for the contact part } I can't help you any further if you can't understand what I'm suggesting to you here.. Denno -
Using "if" commands with 2 separate buttons / if statements
denno020 replied to mat420's topic in PHP Coding Help
Yeah man that's what I'm trying to tell you... From the code that I posted, only one if section will run, so it doesn't matter if you have similar or the same code in the top 'if' as you do in the 'else if' because only one will run. Follow the format that I gave you, and you shouldn't have any problems.. Denno -
Using "if" commands with 2 separate buttons / if statements
denno020 replied to mat420's topic in PHP Coding Help
It needs to be an else if mate. The user can't hit both the submit buttons at the same time? So you're checking one OR the other, not both... Also, on your site, you don't have any form tags for the email part, only in the contact part.. I assume you will be fixing this up? Denno -
Using "if" commands with 2 separate buttons / if statements
denno020 replied to mat420's topic in PHP Coding Help
What didn't let you? I don't understand the problem you're having? -
Using "if" commands with 2 separate buttons / if statements
denno020 replied to mat420's topic in PHP Coding Help
Ahhh now this makes sense lol. What I would do is pretty similar to what you have.. Give each submit button a different name, then when processing in php: //assuming left send button is called submitEmail and right is called submitContact if(isset($_POST["submitEmail"])){ //do the form processing for the email submission part }else if(isset($_POST["submitContact"])){ //do the form processing for the contact part } Is that the sort of thing you're after? Denno -
Form generating function--Need help with modification
denno020 replied to RopeADope's topic in PHP Coding Help
As I took the time (<10 seconds) to search Google, I could just rip off the website that I found the code on and post it here to make myself look good, but I'm not going to do that. Instead I'll provide you the link so you can go and learn for yourself. http://snippets.dzone.com/posts/show/3369 I don't mean to sound like a jerk, but so many questions can be easily answered by a simple Google search.. Denno -
Give this link a go mate: http://www.codewalkers.com/c/a/Database-Articles/Storing-Images-in-Database/3/ It was easy enough to find using Google... Denno
-
Using "if" commands with 2 separate buttons / if statements
denno020 replied to mat420's topic in PHP Coding Help
Do you know that you have a few missing closing curly brackets? I'm trying to find where if statements start and end, but I'm finding it very hard... Also, what is the purpose of send1 and send2? Are these options in the form? Denno -
Forms where Displayed Option Different from Value?
denno020 replied to gmark's topic in PHP Coding Help
Do you mean you want to display data in the data field which will indicate to the user what kind of data to enter in the field? You can use javascript for this.. Denno -
Here is part 1 of a series of youtube videos where the guy goes through everything you need to create a shopping cart. He uses multi arrays too. I have learnt all my php from this dude, he's very good. You can watch the whole series and get a firm grasp on everything, or you can just find the video where he talks about the multi arrays . Enjoy Denno
-
Don't make External URLs: look like a button. All you need to have is some text along the topline of the bar saying something like "Check out these sites:". Something along those lines. But it's your site, so make it how you like it . Denno
-
I really wouldn't go opening ports on your computer buddy.. Just sign up to a free web host and post it on there for him to see.. Denno
-
Oh right. I'm happy to help you with problems, I'm not going to spend time cleaning your code though to make it look nice, that's something you need to do . One suggestion though, if you want people to stay on your site, then you should make your external links open in a new window. You should also let people know that the links are to external sites, as I thought it was a navigation bar, which it isn't really.. Denno
-
Absolutely no idea what you're talking about there mate.... Denno
-
I do not think that your IP address and localhost point to the same place?? Are you trying to show your mate who is on another computer connected to a different network? If so, you've got no chance without uploading it to a web server, or configuring your computer to be a web server itself, which is a real pain in the a$$. Denno
-
Alright so now we know that the link is being printed using parse_feed($twitterFeed) Can you also add the extra line you see below: $tweet = str_replace("<", "<", $tweet); $tweet = str_replace(">", ">", $tweet); $tweet = str_replace(""",""", $tweet); //you may nee to add a backslash before the double quote that's inbetween double quotes (the middle argument) Denno
-
Well then change the script to only echo one thing at a time.. Or instead of adding the space between each element, add a separator as such: echo stripslashes($prefix) . " | " . parse_feed($twitterFeed) . " | " . stripslashes($suffix); Then you will clearly see which part belongs to what. Infact, are you able to do that and then upload it to your site so I may see as well? Denno
-
In what way do you have to build a report? Do you mean you have to get results from a database and then display them nicely on a page? That will be very simple. Most of it will be HTML, with a bit of the php for getting the data. Give this site a go: http://www.tizag.com/mysqlTutorial/ Also use w3schools.com and look at the server scripting. Denno
-
Can you please tell me which parts of the twitter feed correspond to the 3 parts of the echo? Denno
-
You will need to use a form, obviously. Now I'm assuming that the lines saying "if select box value isset onchange stylecolour" is just your way of saying which drop down option has been selected? What you would do it this: //Have a form on your page that has an empty action (it will refresh with the same page) //At the top of your page you will have code to check if a form has been submitted, like this: if(isset($_POST["submit"])){ //Then you can do your checking of the drop downs like this if($_POST["drop_down_1"] == "styleColour"){ echo "styleColour"; //This will be echoed into your header where the style sheet is, changing which style sheet is loaded. }else{ //you can add else if, however if there is only two options, and one of the options have to be picked, the extra condition isn't needed echo "styleGrey"; } } It will be very similar above for the 2d/3d changing, just checking that corresponding drop down instead. Hope that helps Denno
-
Add a space in your echo line. Like this perhaps: echo stripslashes($prefix) . " " . parse_feed($twitterFeed) . " " . stripslashes($suffix); That will hopefully break up the link and the text before it, which means the text before it won't also be assigned the hyperlink... Denno
-
Well if the last two images display in your scroller but don't appear in the database, then I would suggest making sure there isn't another page in the database view in phpMyAdmin (assuming you're using this). Having 200 records on the one page seems like alot, so it might be broken up into a couple of pages. Also, you have a typo near the bottom with index. $indx = $count[$k];?> should be $index = $count[$k];?> I do believe.... As for the 200th picture, this is infact the 201st picture, as indexing starts at 0. So maybe you're having a problem there somewhere? Denno P.S. Use the code tags or php tags in the future so it's easier for us to read your code.
-
Remove the double quotes around $email when you assign it to $to. This is how you want it: $to = $email; As for anything else, you're going to have to give more information as to what you actually want, and what you're having problems with. Denno
-
Instead of change the page id for each page on successive days, you should give each page it's own page id, which it will keep forever. Then when you query the database to get the pages, sort them in descending order with respect to page id. This will display the most recent page first. I do believe this is the type of thing you're after? Denno