Multiple submit buttons not working
===

I am looking for a solution to multiple submit buttons using simple php.

Here is my form code
<!-- Form Starts -->
					<form id="myform" name="myform" method="post" action="pages_add_process.php" accept-charset="utf-8">

					<!-- Widget Starts -->
					<div class="widget">
						<div class="title js_opened">
							<div class="icon"><img src="themes/<?php echo WEBSITE_ADMIN_PANEL_THEME; ?>/images/icons/navigation/pages<?php echo $retina_suffix; ?>.png" width="24" height="24" alt="" /></div>
							<span>Fill The Fields Marked With *</span>
						</div>
						<div class="content">
							<div class="form_row first">
								<label>Title<span class="star">&nbsp;*</span></label>
								<div class="form_right"><input type="text" name="title" maxlength="100" value="<?php echo $session->getSession("pages_title") ;?>" /></div>
								<div class="clear"></div>
							</div>
							<div class="form_row last">
								<label>Description<span class="star">&nbsp;*</span></label>
								<div class="form_right"><textarea name="description" class="Editor"><?php echo $session->getSession("pages_description") ;?></textarea></div>
								<div class="clear"></div>
							</div>
						</div>
					</div>
					<!-- Widget Ends -->

					<!-- Widget Starts -->
					<div class="widget">
						<div class="title js_opened">
							<div class="icon"><img src="themes/<?php echo WEBSITE_ADMIN_PANEL_THEME; ?>/images/icons/navigation/meta<?php echo $retina_suffix; ?>.png" width="24" height="24" alt="" /></div>
							<span>Metadata Information</span>
						</div>
						<div class="content">
							<div class="form_row first">
								<label>Title</label>
								<div class="form_right"><input type="text" name="meta_title" maxlength="250" value="<?php echo $session->getSession("pages_meta_title") ;?>" /></div>
								<div class="clear"></div>
							</div>
							<div class="form_row">
								<label>Keywords</label>
								<div class="form_right"><textarea id="meta_keywords" name="meta_keywords"><?php echo $session->getSession("pages_meta_keywords") ;?></textarea></div>
								<div class="clear"></div>
							</div>
							<div class="form_row">
								<label>Description</label>
								<div class="form_right"><textarea id="meta_description" name="meta_description"><?php echo $session->getSession("pages_meta_description") ;?></textarea></div>
								<div class="clear"></div>
							</div>
							<div class="form_row">
								<label>Robot</label>
								<div class="form_right">
									<select name="meta_robot">
										<option value="">Please Choose An Option</option>
										<option value="index, follow" <?php if ($session->getSession("pages_meta_robot")=="index, follow") echo "selected=\"selected\""; ?> >index, follow</option>
										<option value="noindex, follow" <?php if ($session->getSession("pages_meta_robot")=="noindex, follow") echo "selected=\"selected\""; ?> >noindex, follow</option>
										<option value="index, nofollow" <?php if ($session->getSession("pages_meta_robot")=="index, nofollow") echo "selected=\"selected\""; ?> >index, nofollow</option>
										<option value="noindex, nofollow" <?php if ($session->getSession("pages_meta_robot")=="noindex, nofollow") echo "selected=\"selected\""; ?> >noindex, nofollow</option>
									</select>
								</div>
								<div class="clear"></div>
							</div>
							<div class="form_row last">
								<label>Author</label>
								<div class="form_right"><input type="text" name="meta_author" maxlength="50" value="<?php echo $session->getSession("pages_meta_author") ;?>" /></div>
								<div class="clear"></div>
							</div>
						</div>
					</div>
					<!-- Widget Ends -->

					<div class="form_buttons">
						<input type="submit" name="add" value="Save" />&nbsp;<span class="no_mobile">&nbsp;</span>
						<input type="submit" name="add" value="Save &amp; New" />&nbsp;<span class="no_mobile">&nbsp;</span>
						<input type="reset" value="Clear" />
					</div>
					</form>
					<!-- Form Ends -->

and here is my php processing page code (I have omitted the part which saves the form results into the database.

    <?php
    $submit = $_POST["add"];
    if ($submit == "Save")
    {
	header("location:pages_view.php?type=success&msg=" .urlencode($msg));
	exit();
    }
    else
    {
	header("location:pages_add.php?type=success&msg=" .urlencode($msg));
	exit();
    }
    ?>

What I want to achieve is that if I press the 1st submit button in form i.e Save, then it should save the form and go to view page and if I press the 2nd submit button i.e Save & New then it should save the form data and go back to the same page i.e add page.

Please help me to find out the solution.
