PHP - Moved: Need Help With Assignment I Will Pay $30
This topic has been moved to PHP Freelancing.
http://www.phpfreaks.com/forums/index.php?topic=358320.0 Similar TutorialsHello I have an assignment and I am really struggling with it, just wondering if anyone can give me a start or some help with it. I have uploaded the files we have been given and also the details of what we need I am really stuck and appreciate any help thanks Hi. I've been working on a shopping cart for a college course, and everything is going all right but there is something I'm confused about. What the professor wants is for the total number of items in the shopping cart to be displayed on all pages EXCEPT the actualy cart page. Right now, this feature appears on all pages, including the cart. I don't know how to make it invisible on the cart page . Here is the code from the header.html file, which is where the function to display this feature is located: Code: [Select] <?php # Script 5.2 - header.html /* * This page begins the HTML header for the site. * The header also creates the right-hand column. * This page calls session_start(). */ // Need sessions! session_start(); // Check for a $page_title value: if (!isset($page_title)) $page_title = 'WC::Widget Central'; ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title><?php echo $page_title; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="./includes/style.css" rel="stylesheet" type="text/css" /> </head> <body> <div class="all"> <div class="box"> <div class="menu"><a href="index.php">home</a><a href="about.php">about</a><a href="products.php">products</a><a href="contact.php">contact</a></div> <div class="header"><img alt="" style="float:right; " src="./images/www.jpg" width="225" height="95" /> <h1>[<span class="style1">WC</span>] Widget Central</h1> <div class="clearfix"></div> </div> <div class="newsbar"> <h1>Browse Widget Categories</h1> <div class="p2"><ul> <?php // Get all the categories and // link them to category.php. // Define and execute the query: $q = 'SELECT category_id, category FROM categories ORDER BY category'; $r = mysqli_query($dbc, $q); // Fetch the results: while (list($fcid, $fcat) = mysqli_fetch_array($r, MYSQLI_NUM)) { // Print as a list item. echo "<li><a href=\"category.php?cid=$fcid\">$fcat</a></li>\n"; } // End of while loop. ?></ul></div> <?php if($_SERVER['PHP_SELF']!="../cart.php"){ echo "<h1>Cart Contents</h1>"; echo "<div class=\"p2\">"; $qty=0; $itemCount=$qty; foreach($_SESSION['cart'] as $qty){ for($i=0;$i<count(qty);$i++){ $itemCount+=$qty; } } echo "<a href=\"cart.php\">You have ".$itemCount." items in your cart.</a>"; echo "</div>\n"; } ?> <h1>Specials</h1> <div class="p2"> Coming soon. </div> </div> <div class="content"> If anyone can help, I'd greatly appreciate it! Thanks in advance! Hey guys. Im about to fail my PhP course and need help with an assignment asap. You would have to create a php login script.
If you are interested, please PM me and we'll go over details. Thanks!
Hello, I'm a cs student (2nd year) this year has been a disaster for us the students(studying over zoom and shit), I have a tiny tiny project that a have to finish in the next 24 hours, we made a small sample website using html and js, and now we need to switch it to php language and make the site responsive and later on add SQL. I would very much appreciate if someone can help me for couple of minutes over zoom and help me complete it. All I have left is echo the products from an array with a loop and make a php table that will put my items to my cart. It's my first time here..hope there is some good people here Edited July 21, 2020 by requinixadded thread title We have the page that the users enter the information, which shows as this in an html file: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Scholarship Form</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <link href="style.css" type="text/css" rel="stylesheet" /> </head> <?php ?> <body> <h1 style = "text-align:center">Scholarship Form</h1> <form name = "scholarship" action = "process_Scholarship.php" method = "post"> <p>First Name: <input type="text" name="fName" /></p> <p>Last Name: <input type="text" name="lName" /></p> <p><input type="reset" value="Clear Form" /> <input type="submit" name="Submit" value="Send Form" /> </form> </body> </html> and then the attached file, process_Scholarship.php is the file giving me trouble. We're supposed to be using advanced escaping techniques from our book, and that's when things got tricky. I know it's something silly but I just cant figure it out! Any help asap would be awesome!!!! Hi there, First of all, I want to present the diagram that I'm working on. ----------- Diagram ----------- step2_a.php --| step2_b.php --|---> output.php step2_c.php --| (Process is included here) step2_d.php --| and here are the corresponding codes: step2_x: Code: [Select] . . . <form action="output.php" method="post" name="a"> req1: <input type="text" name="a_req_1"> req2: <input type="text" name="a_req_2"> . . . <input type="submit"> </form> ------ . . . <form action="output.php" method="post" name="b"> req1: <input type="text" name="b_req_1"> req2: <input type="text" name="b_req_2"> . . . <input type="submit"> </form> . . . . . . output.php: Code: [Select] <?php $form_name = $_POST['a']; if($form_name = "a") { //variables for a goes here //code goes here } elseif($form_name = "b") { //variables for b goes here //code goes here } elseif($form_name = "c") { //cariables for c goes here //code goes here } elseif($form_name = "d") { //variables for d goes here //code goes here } else { //code goes here } ?> Now, here's the problem. output.php always sees the primary condition as true. Even the data came from step2_b, the code does not recognize it. I tried to use "==" instead of "=" but the code sees the arguments as false so it executed the code on "else". How can I make the code distinguish the source of the data so that it would execute the right set of commands? Thanks in advance. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=315910.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=316254.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=342987.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=342919.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=319767.0 This topic has been moved to PHP Freelancing. http://www.phpfreaks.com/forums/index.php?topic=349322.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=343318.0 This topic has been moved to PHP Installation & Configuration. http://www.phpfreaks.com/forums/index.php?topic=319595.0 This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=314397.0 This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=327250.0 This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=356314.0 This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=325953.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=356760.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=328753.0 |