Jump to content

JLitkie

Members
  • Posts

    43
  • Joined

  • Last visited

About JLitkie

  • Birthday 10/19/1984

Profile Information

  • Gender
    Male
  • Location
    Las Vegas

JLitkie's Achievements

Member

Member (2/5)

0

Reputation

  1. Hello I created a form where the table to enter into uses calls from a database for the questions, but the generated fields are not called they are created with a foreach. The form calls just fine, however when I go to the page to process and update the table, it does not seem to want to insert the answers on an update. I have tried variable combinations and tried to research the problem to no avail. HELP!!! form coding $result = mysql_query("SELECT * FROM interviews WHERE id='$int'"); while($row = mysql_fetch_array($result)){ $a = $row[1]; $b = $row[2]; $c = $row[3]; $d = $row[4]; $e = $row[5]; $f = $row[7]; $g = $row[8]; $h = $row[9]; } $i = array(); $result = mysql_query("SELECT * FROM dbinter WHERE interview_id='$int'"); while($row = mysql_fetch_array($result)){ $i[] = $row[2]; } $l = array(); $result = mysql_query("SELECT * FROM form_custom WHERE attached='$cid' && date='$e'"); while($row = mysql_fetch_array($result)){ $l[] = $row[0]; } echo "<font style='font-size: 45px;'>$a $b</font>"; echo "<p><font style='font-size: 20px;'>$c <br />$d</font></p>"; echo "<form method='POST' name='interview' action='interviewsheet.php?cid=$cid&int=$int&stat=proc'>"; echo "<div style='margin-top:50px;'><input type='submit' value='COMPLETE INTERVIEW'></div>"; foreach($i as $j){ $result = mysql_query("SELECT * FROM form WHERE id='$j'"); while($row = mysql_fetch_array($result)){ $k = $row[2]; } echo " <div style='margin: 20px;'> <font styler='font-size: large; font-weight: bold;'>$k</font><br /> <textarea rows='5' cols='60' style='border: none;' name='q'></textarea> </div> ";} foreach($l as $m){ $result = mysql_query("SELECT * FROM form_custom WHERE id='$m'"); while($row = mysql_fetch_array($result)){ $n = $row[2]; } echo " <div style='margin: 20px;'> <font styler='font-size: large; font-weight: bold;'>$n</font><br /> <textarea rows='5' cols='60' style='border: none;' name='qc'></textarea> </div> ";} echo "</div>"; Here is the processing page code: $act = $_GET['act']; $cid = $_GET['cid']; $int = $_GET['int']; $stat = $_GET['stat']; $sub = $_GET['sub']; if($stat == "proc"){ $c = array(); $c[] = $_POST['q']; foreach($c as $b => $d){ $sql = "UPDATE dbinter SET answer='$d' WHERE interview_id='$int'"; if (!mysql_query($sql,$con)){die('Error: ' . mysql_error());} } $f = array(); $f[] = $_POST['q']; foreach($f as $g => $f){ $sql = "UPDATE dbinter SET answer='$f' WHERE attached='$cid'"; if (!mysql_query($sql,$con)){die('Error: ' . mysql_error());} }
  2. Hi, Im trying to call from a database and have it put it in a set of divs and paragraphs. After three sets it puts in a set of code and repeats the previous divs sets but with continued information called from the database. A copy of the code ii have and the original code is below. current code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="dcterms.created" content="Tue, 13 Nov 2012 21:07:39 GMT"> <meta name="description" content=""> <meta name="keywords" content=""> <title></title> <!--[if IE]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> </head> <body> <?php include 'db_connect.php'; mysql_select_db("xxxxxxxxxxxxx", $con); $result = mysql_query("SELECT * FROM image_info"); $i = 0; while($row = mysql_fetch_array($result)) { $i++; $additionalClass = ($i % 3) == 0 ? " last" : ""; echo "<div class='photo m_bot1" . $additionalClass . "'>"; echo "<div class='photo m_bot1'> <p> <a href='#' class='img_wrap'><img src='$row[3]' width='286' height='268' alt='photo1' /></a> </p> <a href='#'><span class='white'>$row[2]</span><br> $row[1]</a> </div>"; } ?> </body> </html> old code: <!DOCTYPE html> <html lang="en"> <head> <title>Photos</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width; initial-scale=1.0"> <link rel="icon" href="images/favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" /> <link rel="stylesheet" type="text/css" media="screen" href="css/style.css"> <script type="text/javascript" src="js/jquery-1.7.min.js"></script> <script type="text/javascript" src="js/superfish.js"></script> <script type="text/javascript" src="js/jquery.responsivemenu.js"></script> <script type="text/javascript" src="js/jquery.easing.1.3.js"></script> <script type="text/javascript" src="js/jquery.elastislide.js"></script> <!--[if lt IE 8]> <div style=' clear: both; text-align:center; position: relative;'> <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode"> <img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." /> </a> </div> <![endif]--> <!--[if lt IE 9]> <script type="text/javascript" src="js/html5.js"></script> <link rel="stylesheet" type="text/css" media="screen" href="css/ie.css"> <![endif]--> </head> <body> <div class="main"> <nav> <div class="container_12"> <ul class="sf-menu"> <li class="sf-with-ul"><a href="index.html">home</a> <ul> <li><a href="#">Annual Passes</a></li> <li><a href="#">Oceans Society</a></li> <li><a href="#">Sponsors</a> <ul> <li><a href="#">Aquarium Events</a></li> <li><a href="#">Neon Tetras</a></li> <li><a href="#">Mollies</a></li> <li class="bd_none"><a href="#">Species</a></li> </ul> </li> <li class="bd_none"><a href="#">Swordtails</a></li> </ul> </li> <li><a href="index-1.html">about</a></li> <li class="current"><a href="index-2.html">photos</a></li> <li><a href="index-3.html">club info</a></li> <li><a href="index-4.html">fish</a></li> <li><a href="index-5.html">contact us</a></li> </ul> <form id="search" action="search.php" method="GET" accept-charset="utf-8"> <input type="text" name="s" /> <a onclick="document.getElementById('search').submit()"></a> </form> <div class="clear"></div> </div> </nav> <!--==============================header=================================--> <header> <div class="container_12"> <h1><a class="logo" href="index.html">Aquamarine</a></h1> <div class="social"> <a href="#" title="Facebook"><img src="images/soc1.png" width="23" height="46" alt=""></a> <a href="#" title="RSS"><img src="images/soc2.png" width="23" height="46" alt=""></a> <a href="#" title="Google +"><img src="images/soc3.png" width="23" height="46" alt=""></a> <a href="#" title="Twitter"><img src="images/soc4.png" width="23" height="46" alt=""></a> </div> <div class="clear"></div> </div> </header> <!--==============================content================================--> <section id="content"> <div class="container_12"> <div class="wrapper"> <article class="grid_12"> <h2 class="ind2">Our photos</h2> <div class="car_box"> <div id="carousel" class="es-carousel-wrapper"> <div class="es-carousel"> <ul> <li class="first_it"> <div class="photo m_bot1"> <p> <a href="#" class="img_wrap"><img src="images/photo1.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Sed ut perspiciatis</span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> <div class="photo m_bot1"> <p> <a href="#" class="img_wrap"><img src="images/photo4.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Aliquam erat volutpat</span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> <div class="photo"> <p> <a href="#" class="img_wrap"><img src="images/photo7.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Duis ultricies</span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> </li> <li class="first_it"> <div class="photo m_bot1"> <p> <a href="#" class="img_wrap"><img src="images/photo2.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Mauris accumsan nulla</span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> <div class="photo m_bot1"> <p> <a href="#" class="img_wrap"><img src="images/photo5.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Integer rutrum</span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> <div class="photo m_bot1"> <p> <a href="#" class="img_wrap"><img src="images/photo8.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Maecenas tristique</span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> </li> <li class="first_it"> <div class="photo m_bot1"> <p> <a href="#" class="img_wrap"><img src="images/photo3.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Nulla facilisi</span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> <div class="photo m_bot1"> <p> <a href="#" class="img_wrap"><img src="images/photo6.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Nam elit magna, hendrerit</span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> <div class="photo m_bot1"> <p> <a href="#" class="img_wrap"><img src="images/photo9.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Donec accumsan malesuada </span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> </li> <li class="first_it"> <div class="photo m_bot1"> <p> <a href="#" class="img_wrap"><img src="images/photo1.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Sed ut perspiciatis</span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> <div class="photo m_bot1"> <p> <a href="#" class="img_wrap"><img src="images/photo4.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Aliquam erat volutpat</span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> <div class="photo"> <p> <a href="#" class="img_wrap"><img src="images/photo7.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Duis ultricies</span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> </li> <li class="first_it"> <div class="photo m_bot1"> <p> <a href="#" class="img_wrap"><img src="images/photo2.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Mauris accumsan nulla</span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> <div class="photo m_bot1"> <p> <a href="#" class="img_wrap"><img src="images/photo5.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Integer rutrum</span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> <div class="photo m_bot1"> <p> <a href="#" class="img_wrap"><img src="images/photo8.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Maecenas tristique</span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> </li> <li class="first_it"> <div class="photo m_bot1"> <p> <a href="#" class="img_wrap"><img src="images/photo3.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Nulla facilisi</span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> <div class="photo m_bot1"> <p> <a href="#" class="img_wrap"><img src="images/photo6.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Nam elit magna, hendrerit</span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> <div class="photo m_bot1"> <p> <a href="#" class="img_wrap"><img src="images/photo9.jpg" width="286" height="268" alt="photo1" /></a> </p> <a href="#"><span class="white">Donec accumsan malesuada </span><br> Donec vestibulum, eros sed adipiscing aliquet, magna mauris ultrices mi, in vestibulum ligula dolor eu nibhsi. Ut sollicitudin lectus nec libero porta dignissim.</a> </div> </li> </ul> </div> </div> </div> </article> </div> </div> </section> <!--==============================footer=================================--> <footer> Aquamarine © 2012 | <a href="index-6.html">Privacy Policy</a> </footer> </div> </body> </html>
  3. sorry forgot parent script and <SCRIPT LANGUAGE="JavaScript"> function openChild(file,window) { childWindow=open(file,window,'resizable=yes,scrollbars=yes,width=500,height=600'); if (childWindow.opener == null) childWindow.opener = self; } </SCRIPT> </head> <body> <form method="POST" action="proc3.php" name="catering"> <table cellpadding=5 border=0 width=80% align=left> <tr> <td><b>Name</b></td> <td><input type=text name="name" size=50 class="form"></td> </tr> <tr> <td><b>Phone</b></td> <td><input type=text name="phone" size=25 class="form"></td> </tr> <tr> <td><b>Email</b></td> <td><input type=text name="email" size=50 class="form"></td> </tr> <tr> <td colspan=2 valign=top><b>Catering Request Description <INPUT TYPE="button" VALUE="(MENU)" onmouseover="" onClick="openChild('menusub.php','win2')" class="menusubhead"></td></tr> <tr> <tr> <td></td> <td> <input type=hidden name="subject" value="Catering Service" size=50 class="form"> <textarea name="details" id="details" cols="50" Rows="12" style="font-size:15px; border:solid; font-family:Bradley Hand ITC, Book Antiqua, Arial; border:solid 1px; background-color:transparent;"></textarea></td> </tr> <tr> <td></td> <td><input type=submit class="submit" value="Send Message" style=""></td> </tr> </table> </form> child window <SCRIPT LANGUAGE="JavaScript"> var myarray_child = new Array (); function updateParentArray() { opener.document.catering.details.value = (myarray_child); } </SCRIPT> </head> <body> include("database.php"); mysql_select_db("db369261593", $con); $result = mysql_query("SELECT * FROM menu WHERE category='Antipasti' AND status='current'"); while($row = mysql_fetch_array($result)) { echo"<tr><td> <SCRIPT LANGUAGE='JavaScript'> myarray_child='$row[1]' </SCRIPT> <INPUT TYPE='SUBMIT' value='$row[1]' class='menusubhead' onClick='updateParentArray()'> <font class='subhead'><b>$$row[4]</b></font><br></font> <font class='menutext'>$row[2]</font> </tr></td>"; } The child window has about 5 or six of the above code repeated for each section. I just put in the snippets, if you need more please let me know.
  4. I have been struggling to get this problem fixed. I am trying to click on a link in a child window and have it add information to a textbox in a parent window. I have gotten close through some Javascript, but its still not working correct. The main problem is that the information on the child window is pulled from a database and wont cooperate with the javascript. I appreciate any help I can get on this one, thanks ya'll.
  5. Hey guys I am very frustrated with this code. I'm trying to write it to where you have a textbox, you click on a link/button and a child window pops. When you click on something from the child window it adds it to the textbox on the parent form. I am using a mix of javascript and php because the items on the child window is pulled from a db. The script pieces are below. this is the java from the parent <SCRIPT LANGUAGE="JavaScript"> function openChild(file,window) { childWindow=open(file,window,'resizable=yes,scrollbars=yes,width=500,height=600'); if (childWindow.opener == null) childWindow.opener = self; } </SCRIPT> This is the form from the parent, im trying to paste it to the textbox named "details". I want to add to what ever they are typing and not replace it. <form method="POST" action="proc3.php" name="catering"> <table cellpadding=5 border=0 width=80% align=left> <tr> <td><b>Name</b></td> <td><input type=text name="name" size=50 class="form"></td> </tr> <tr> <td><b>Phone</b></td> <td><input type=text name="phone" size=25 class="form"></td> </tr> <tr> <td><b>Email</b></td> <td><input type=text name="email" size=50 class="form"></td> </tr> <tr> <td colspan=2 valign=top><b>Catering Request Description <INPUT TYPE="button" VALUE="(MENU)" onmouseover="" onClick="openChild('menusub.php','win2')" class="menusubhead"></td></tr> <tr> <tr> <td></td> <td> <input type=hidden name="subject" value="Catering Service" size=50 class="form"> <textarea name="details" id="details" cols="50" Rows="12" style="font-size:15px; border:solid; font-family:Bradley Hand ITC, Book Antiqua, Arial; border:solid 1px; background-color:transparent;"></textarea></td> </tr> <tr> <td></td> <td><input type=submit class="submit" value="Send Message" style=""></td> </tr> </table> </form> This is the script from the child window <SCRIPT LANGUAGE="JavaScript"> var myarray_child = new Array (); function updateParentArray() { opener.document.catering.details.value = (myarray_child); } </SCRIPT> This is the information being pulled from the db that should be placed in the textbox. When i click it, it does send it, however it over writes everything in the box and its only pulling up the last result from the table. There are five things pulled from this db and I can only get it work for one. $result = mysql_query("SELECT * FROM menu WHERE category='Antipasti' AND status='current'"); while($row = mysql_fetch_array($result)) { echo"<tr><td> <SCRIPT LANGUAGE='JavaScript'> myarray_child='$row[1]' </SCRIPT> <INPUT TYPE='SUBMIT' value='$row[1]' class='menusubhead' onClick='updateParentArray()'> <font class='subhead'><b>$$row[4]</b></font><br></font> <font class='menutext'>$row[2]</font> </tr></td>"; } I appreciate any help i can get!! I am very frustrated and I have been at this for two days!! I spent my entire day on looking through coding websites to get help and Im stilled coming up short. Thanks guys!
  6. Hey guys I am having a struggle with some coding. I have a page where you can open a popup window with a bunch of links on it. I want to be able to click a link and have the information obtained on the link write to a textbox on the parent window. The window needs to stay open so they can click on several links and add a bunch of information to the text box. My current coding for the child window is: while($row = mysql_fetch_array($result)) { echo"<tr><td><a href='#' class=''" ?> onclick="opener.document.forms["catering"].elements["details"].value = '<?php echo"$row[1]"; ?> '"> <?php echo"$row[1]</a> <font class='subhead'><b>$$row[4]</b></font><br></font> <font class='menutext'>$row[2]</font> </tr></td>"; } The coding for the parent window regarding the form is: <form method="POST" action="proc2.php" name="catering"> <table cellpadding=5 border=0 width=80% align=left> <tr> <td><b>Name</b></td> <td><input type=text name="name" size=50 class="form"></td> </tr> <tr> <td><b>Phone</b></td> <td><input type=text name="phone" size=25 class="form"></td> </tr> <tr> <td><b>Email</b></td> <td><input type=text name="email" size=50 class="form"></td> </tr> <tr> <td colspan=2 valign=top><b>Catering Request Description <a href="menusub.php" onclick="NewWindow(this.href,'name','500','500','yes');return false" class="menusub">(MENU)</a></b></td> </tr> <tr> <tr> <td></td> <td> <input type=hidden name="subject" value="Catering Service" size=50 class="form"> <textarea name="details" id="details" cols="50" Rows="12" style="font-size:15px; border:solid; font-family:Bradley Hand ITC, Book Antiqua, Arial; border:solid 1px; background-color:transparent;"></textarea></td> </tr> <tr> <td></td> <td><input type=submit class="submit" value="Send Message" style=""></td> </tr> </table> </form> I appreciate any help I can get!!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.