hag++ 24 Junior Poster

While an HTML5 solution is progressive it won't work for older browsers (specifically IE8 and under). You may want to consider a fallback to that, such as the html5media library which will provide video tag support for older browsers.

hag++ 24 Junior Poster

While the OP didn't say whether his app was using sessions or not I would definitely reccomend storing the names in session or in the cookie. If neither option is available then you would have to do some kind of workaround such as what Dani suggested.

hag++ 24 Junior Poster

I highly agree with diafol if you have time to change it. If not and ryantroop's above comment is a concern then you could always redirect the user to the cart with every param except the ones used to add items.

hag++ 24 Junior Poster

There's no safety zones on php, it's a given.

Boy I hate it when people blame the tools instead of the developers. Sites built on ANY language can contain massive security holes if web security best practices are not followed. Blaming PHP is analagous to a bad carpenter blaming his hammer for the house collapsing.

hag++ 24 Junior Poster

The solution to your problem? Don't refresh. :-/

Not true. I would reccomend simply doing a redirect to the regular cart URL (without params) after you have updated the cart quantities. I put an example below. Since I don't know your URL's I improvised :)

if (isset($_GET['add']))
    $_SESSION['cart_'.$_GET['add']]+='1';
    header('Location: /cart.php');
}
hag++ 24 Junior Poster

You're not going to see a huge difference efficiency wise, this all comes down to what design makes more sense for your project.

hag++ 24 Junior Poster

It just shows you, how one can use the prepare() method, and run statements with it, but it never shows, what/how the prepare method is created, what is inside the prepare method, or what is inside the PDO() class for that matter. I want to know, what is the in PDO() class, and its, properties & methods, how it looks, but the manual never shows that.

And that is exactly the point of creating a class in the first place. All of the logic and details of "how" are hidden within the interface. All one needs to know is how to use it, not how it works.

Say you have a method "abc". The documentations says that it takes a string input and returns it in all capital letters. Thats all you need to know in order to use it. You don't need to know how it goes about capitalizing each letter.

hag++ 24 Junior Poster

Ok well a couple things here. One, don't do this ever:
$sql="SELECT branch_name,branch_address,branch_contact,branch_nostaffs,branch_furniture FROM branch_details WHERE branch_id = '" . $name ."'";
That's wide open to SQL injection.

As far as why your search isn't working I'll need more info.
If you run the query directly against the database does it return data? Either run the query via the command line or in mysql workbench.

If it does not return data then you need to investigate why. If it does return data then we need to look more into your script.

Kyle Wiering commented: Awesome security catch! +0
hag++ 24 Junior Poster

What you need to do is have the server return a link to the image. Something like "http://mysite.com/images/my_image.jpeg". Then take that link and apply it to the "src" tag of an image element. designershiv's answer above would do it if you were using jQuery but it doesn't look like you are. To apply the source do this:

var imageElem = document.getElementById('image_elem_id');
imageElem.src = 'http://mysite.com/images/my_image.jpeg';
hag++ 24 Junior Poster

Well for one it seems like you are catching an OleDbException and showing a MessageBox with the Source property in it. Calling the Source property alone doesn't really tell you much about why the exception is being thrown. Try putting the Message property in the message box instead and let us know what that says. Since I don't use access I can't really test your code locally.

hag++ 24 Junior Poster

ok, base isn't a method, and I'm smart enough to know that!

so, here's the definition:

class cmd
{
string base;
char extension[80];
};

yes, that's really all there is, it's just a way for me to organize the commands.

Wooah don't get sassy or nobody will help you. You need to declare the member variables as public if you are going to access them directly (Instead of using getter, setter methods).

jonsca commented: Yes, I totally flew past that +7
hag++ 24 Junior Poster

You cant get the file to open? Does the file exist in your project directory? Also, in lines 37 and 38 you do:

if (i % 2 == 0) evenSum += i;
if (i % 2 > 0) oddSum += i;

You have never initialized i with a value. This will produce a logical error.

hag++ 24 Junior Poster

The structure of you program overall is a little off. The option to Quit should really only be contained in the main program loop. So you should present all of the options that the program can do (which includes quit) just in the main menu.

hag++ 24 Junior Poster

What about calling the generateString function within your buttonclick function, except have generateString return the string instead of void

private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) 
{
	String^ getgenerateString = generateString(); 
}

String^ generateString()
{
	String^ sendThisString = "SendThis";
         return sendThisString;
}
hag++ 24 Junior Poster

People on here are not going to respond to your post, it is junk. Why? Well first please read the posting rules (that will pretty much tell you why) You can't just say heres my program, what do I do to finish it? You need to put in the effort, and if you get stuck on a certain part, then post your question.

thomas_naveen commented: agree +1
hag++ 24 Junior Poster

normally we try to help people here an not do the work for them but yea.... ok

hag++ 24 Junior Poster

how i can do database in c++

Ok, well first, I would read the rules on Posting in the forums because this is not a good question. This forum is for helping people out with the areas of C++ that they are having trouble with, your question is too broad. You need to do some searching on google, get some books, etc.... post code and then people will help you.

hag++ 24 Junior Poster

Ok, first off, please read this before posting code again:
http://www.daniweb.com/forums/misc-explaincode.html

Second, you need to accumulate the numbers that are entered by the user. Depending on what you have learned so far, you can either use an accumulator (the numbers entered by the user are added to this variable with each iteration of the loop) or you could use an array, then add all the elements in the array, get the average, etc...

hag++ 24 Junior Poster

Ok.... adcodingmaster.... look at your first post, then your second post. The ONLY thing that changed was now you have colors for keywords....

Salem commented: And it still looks like crap! +19
hag++ 24 Junior Poster

rand() % 7 is going to get you numbers between 0 and 6 which will overstep the bounds of your array by 1 if a 6 is pulled.

I'm confused why you broke up the loop like you did?

That is correct, if you use rand() % 6 + 1 you will be good. Also, when you define a function:

void printScreen(char dice[16][6])

You only need the second array size defined.

void printScreen(char dice[][6])