can someone have any thoughts if my imagination is even posible?..i would like to display a alert-dismissable div after saving data to database but i dont know if it is posible i googled it but no match for my situation since i no master of ajax technique to hide my saving process and display a modal for the result of the process..please help..

header("location:products.php"what should i put in here?" ")

btw im saving this kind of fields to the database and i admit i dont know how to do it in ajax technique..

item name,price,stocks stockNO,category,supplier,description and image(text directory)

saving all of that is finished but its the message that i am having problem with..THANK YOU..

There is definitely a way to submit data to a file, and receive the result (true/false etc.) and then call a JS function to generate.

There is definitely no need to use header() with this sort of thing.

Take a look at this: http://stackoverflow.com/questions/21328135/cant-read-php-file-output-with-ajax

You will have to give it alot of surgey to get it suited to you but it will certainly put you on the right tracks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.