Pavlos1316 Posted December 19, 2010 Share Posted December 19, 2010 Hello, First of all I am using only divs in my site. I am using js to open links inside my content div and is working fine. Now I have a form that customers need to fill. when they fill wrong things they get error msgs. How do I make the error msg to appear in my page instead of opening a new blank one? Thank you Quote Link to comment https://forums.phpfreaks.com/topic/222123-div-inside-div/ Share on other sites More sharing options...
haku Posted December 19, 2010 Share Posted December 19, 2010 You do it like this: <p>There was an error processing your request</p> Quote Link to comment https://forums.phpfreaks.com/topic/222123-div-inside-div/#findComment-1149225 Share on other sites More sharing options...
Pavlos1316 Posted December 19, 2010 Author Share Posted December 19, 2010 where do I add that??? When I was using frames this was working: if (!($Full_Name)){ include 'register.php'; echo "<font color=#00FFFF><font size=4><font weight=bold>Please enter your Full Name!</font></font></font>"; exit(); } Now it doesn't. it opens the include 'file' in a blank page. How is it done using divs? Quote Link to comment https://forums.phpfreaks.com/topic/222123-div-inside-div/#findComment-1149242 Share on other sites More sharing options...
haku Posted December 19, 2010 Share Posted December 19, 2010 where do I add that??? In the spot where you want the error to appear. As for the rest of your issue, you have showed no code that could even begin to help you one way or another. Quote Link to comment https://forums.phpfreaks.com/topic/222123-div-inside-div/#findComment-1149258 Share on other sites More sharing options...
Pavlos1316 Posted December 19, 2010 Author Share Posted December 19, 2010 This is my page.php that opens inseide div id=contnent : <body onLoad="document.forms.order.cust_code.focus();"> <p class="text"><form action="order.php" method="post" enctype="application/x-www-form-urlencoded" name="order" id="order"> Κωδικός Πελάτη <br /> <input name="cust_code" type="text" size="7" maxlength="7" id="cust_code" <?php if (isset($_POST['cust_code'])) { echo 'value="'.$_POST['cust_code'].'"'; } ?>/> <br /> Κωδικοί Παραγγελίας<br /> <input name="order_code" type="text" size="5" maxlength="5" id="order_code" <?php if (isset($_POST['order_code'])) { echo 'value="'.$_POST['order_code'].'"'; } ?>/> <br /> <br /> <img src="GenerateCaptcha.php?width=150&height=35&chs=5&font=AmericanParticipants"/> <br /> <input name="providedCaptcha" type="text" size="19" maxlength="5" id="providedCaptchaId" /> <a href="javascript:ajaxpage('pelatis.php', 'content');"><input name="Submit" type="submit" id="button" onclick="this.form.post" value="Submit" /></a> </form></p> </body> </html> And this is how I check if sthing is wrong: if (!($order_code)){ include 'page.php'; echo "<font color=#00FFFF><font size=4><font weight=bold>Παρακαλώ εισάγετε τουλάχιστον μια (1) παραγγελία!</font></font></font>"; exit(); } But either using the include command or not opens the specified echo in a blank page instead of inside my page.php! Quote Link to comment https://forums.phpfreaks.com/topic/222123-div-inside-div/#findComment-1149347 Share on other sites More sharing options...
haku Posted December 20, 2010 Share Posted December 20, 2010 This is a PHP question. As such, I'm moving it to that forum. Quote Link to comment https://forums.phpfreaks.com/topic/222123-div-inside-div/#findComment-1149395 Share on other sites More sharing options...
Pavlos1316 Posted December 20, 2010 Author Share Posted December 20, 2010 sorry, you are right... let's see if we can find an answer here Quote Link to comment https://forums.phpfreaks.com/topic/222123-div-inside-div/#findComment-1149481 Share on other sites More sharing options...
Pavlos1316 Posted December 20, 2010 Author Share Posted December 20, 2010 Anyone Quote Link to comment https://forums.phpfreaks.com/topic/222123-div-inside-div/#findComment-1149645 Share on other sites More sharing options...
ZulfadlyAshBurn Posted December 21, 2010 Share Posted December 21, 2010 try this. it might work. hopefully <?php if (!($order_code)){ include 'page.php'; ?> <body onLoad="document.forms.order.cust_code.focus();"> <p class="text"><form action="<?php echo $_SERVER['PHP_SELF']?>" method="post" enctype="application/x-www-form-urlencoded" name="order" id="order"> Κωδικός Πελάτη <br /> <input name="cust_code" type="text" size="7" maxlength="7" id="cust_code" <?php if (isset($_POST['cust_code'])) { echo 'value="'.$_POST['cust_code'].'"'; } ?>/> <br /> Κωδικοί Παραγγελίας<br /> <input name="order_code" type="text" size="5" maxlength="5" id="order_code" <?php if (isset($_POST['order_code'])) { echo 'value="'.$_POST['order_code'].'"'; } ?>/> <br /> <br /> <img src="GenerateCaptcha.php?width=150&height=35&chs=5&font=AmericanParticipants"/> <br /> <input name="providedCaptcha" type="text" size="19" maxlength="5" id="providedCaptchaId" /> <a href="javascript:ajaxpage('pelatis.php', 'content');"><input name="Submit" type="submit" id="button" onclick="this.form.post" value="Submit" /></a> </form></p> </body> </html> <?php echo "<font color=#00FFFF><font size=4><font weight=bold>Παρακαλώ εισάγετε τουλάχιστον μια (1) παραγγελία!</font></font></font>"; exit(); } ?> Quote Link to comment https://forums.phpfreaks.com/topic/222123-div-inside-div/#findComment-1149855 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.