Search Results

Search found 2 results on 1 pages for 'umeed'.

Page 1/1 | 1 

  • Php header('Location") error

    - by Umeed
    I'm having some difficulty with my php coding. I have 3 files, add.php, lib.php, and view.php I created a simple form, and when the user clicks submit, it should direct them to the view.php where it will display the database. Now I'm having a couple issues I can't seem to resolve. when the user clicks submit and the fields are blank or there is an error no entry should be made into the view page (or database)...however when I click submit a blank entry is made into the database. ALSO if i click "enter product" from the top menu bar anytime I click it, it causes a blank entry into the database. I can't figure out why that's happening. My next issue is with the header('Location') and my browser says: "Warning: Cannot modify header information - headers already sent by (output started at lib.php:13) in add.php on line 16" However if I click submit on my form it goes away. Here is the code for the pages: http://ideone.com/Vvz8x I truly apologize if the code is really messy. Any help / advice / solution is greatly appreciated thank you. And yes this was an assignment---it was due last week but since I couldn't finish it, it's not worth any marks anymore.

    Read the article

  • C# setting case constant expressions, do they have to follow a specific order?

    - by Umeed
    Say I'm making a simple program, and the user is in the menu. And the menu options are 1 3 5 7 (i wouldn't actually do that but lets just go with it). and I want to make my switch statement using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DecisionMaking2 { class Program { static void Main(string[] args) { Console.WriteLine("Please choose an option: "); string SelectedOpt = Console.ReadLine(); double Selection = Convert.ToDouble(SelectedOpt); double MenuOption = (Selection); switch (MenuOption) { case 1: Console.WriteLine("Selected option #1"); break; case 2: Console.WriteLine("Selected option #3"); break; case 3: Console.WriteLine("Selected option #5"); break; case 4: Console.WriteLine("Selected option #7"); break; default: Console.WriteLine("Please choose from the options List!"); break; } } } } would that work? or would I have to name each case constant expression the option number I am using? I went to the microsoft website and I didn't quite pick up on anything i was looking for. . Also while I have your attention, how would I make it so the user chooses from either option and because I don't know which option the user will select " double MenuOption = " could be anything, whatever the user inputs right? so would what I have even work? I am doing this all by hand, and don't get much lab time to work on this as I have tons of other courses to work on and then a boring job to go to, and my PC at home has a restarting issue lol. soo any and all help is greatly appreciated. p.s the computer I'm on right now posting this, doesn't have any compilers, coding programs, and it's not mine just to get that out of the way. Thanks again!

    Read the article

1