Jump to content

tutorialstuff

Members
  • Posts

    35
  • Joined

  • Last visited

    Never

Everything posted by tutorialstuff

  1. I'm trying to extract the data and place them into variables from the below xml document from the line that says :<day0 name="Monday" date="01/25" max="50" min="41" code="13" phrase="Showers"/> basically I would like it to be like $name=Monday, $max=50 etc... I'm not sure if this would be a job for preg_match or something else and if so, what would be the best way to do this? Thanks for any help! <data> <provider>qwikcast.com</provider> <date>01/25/2010</date> <time>11:05</time> <loc city="Longview" state="WA" country="US" county="Cowlitz" lat="46.1300" lon="-122.9300" elev="21"/> <icon dir="NA"/> − <fcst> <day0 name="Monday" date="01/25" max="50" min="41" code="13" phrase="Showers"/> <day1 name="Tuesday" date="01/26" max="49" min="37" code="12" phrase="PM Showers"/> <day2 name="Wednesday" date="01/27" max="49" min="35" code="2" phrase="Partly Cloudy"/> <day3 name="Thursday" date="01/28" max="51" min="36" code="16" phrase="Light Rain"/> <day4 name="Friday" date="01/29" max="50" min="42" code="16" phrase="Light Rain"/> </fcst> <obs id="KKLS" time="10:35 AM" code="1" phrase="Clear" tempUnit="F" temp="46" appTemp="46" appWord="Apparent" dew="42" rh="87" windSpd="11" windDir="SSE" windUnit="mph" vis="10" visUnit="mi" baro="29.91" baroUnit="in"/> </data>
  2. This seems to work fine in IE8, but whenever I view it in FF3, There is some weird trailing characters after the decrypted text. $decryption_key = "Yru8S09edICE"; $cipher_alg=MCRYPT_RIJNDAEL_256; function hex2bin($data) { $len = strlen($data); return pack("H" . $len, $data); } $iv = bin2hex(mcrypt_create_iv(mcrypt_get_iv_size($cipher_alg, MCRYPT_MODE_CBC), MCRYPT_RAND)); $encryppted_text = mcrypt_encrypt($cipher_alg, $decryption_key, 'this is text', MCRYPT_MODE_CBC, hex2bin($iv)); print $encryppted_text."<br />"; $decrypted_text = mcrypt_decrypt($cipher_alg, $decryption_key, $encryppted_text, MCRYPT_MODE_CBC, hex2bin($iv)); print $decrypted_text;
  3. I am currently trying to work with a 3rd party vendor(acxiom) that requires the use of SOAP requests. Link to vendor dev center https://aissreports.acxiom.com/devzone login: devzone1 password: acxiom Once inside, click the link on the left that says "XML Background Checks" I have several diferent versions of code that I've tried using. I've gone with the built in PHP SOAP class and tried nusoap as well and have had no luck. Here's my attemtp with built in PHP SOAP Class <?php $client = new SoapClient('https://aissreports.acxiom.com/xmlbackgroundtests/xmlresults.asmx?wsdl'); $header = new SoapHeader('https://aissreports.acxiom.com/XMLBackgroundTests/SubmitRequest', 'echoMeStringRequest', 'hello world'); $client->__setSoapHeaders($header); $params = array("fileasstring" =>$requestString); $requestString = file_get_contents('https://aissreports.acxiom.com/devzone/src/1-Integrations/1-XML_Background_Checks/Xml_Request_Examples/Sample_Requests/Sample_A_la_Carte_Product_Request.xml'); $client->__soapCall("SubmitRequest", $params, null); ?> This gives me the error Here's my attempt with nusoap <?php // Pull in the NuSOAP code require_once('../nusoap/lib/nusoap.php'); // Create the client instance $client = new soapclient('https://aissreports.acxiom.com/XMLBackgroundTests/Request.asmx?wsdl'); // Call the SOAP method $result = $client->call('PersonName', array('GivenName' => 'Mischa')); // Display the result print_r($result); ?> which gives me the error Any and all help is greatly appreciated. I've been stumped on this for many days now and am about to lose my mind. :'(
  4. I had this sugguested to me in another forum. function getInput($key) { if(isset($_GET[$key]) && trim($_GET[$key]) !== '') { return(trim($_GET[$key])); } elseif(isset($_POST[$key]) && trim($_POST[$key]) !== '') { return(trim($_POST[$key])); } return null; } $age = getInput('age'); $gender = getInput('gender'); // etc....
  5. Not a bad idea gevans! Anybody else have some other thoughts?
  6. I'm currently creating a search page and I have I'm declaring some php variables and I was wondering if there is a way to shorten this or a better way to do this. if($_GET['age'] != ''){ $age = $_GET['age']; }elseif($_POST['age'] != ''){ $age = $_POST['age']; } if($_GET['gender'] != ''){ $gender = $_GET['gender']; }elseif($_POST['gender'] != ''){ $gender = $_POST['gender']; } if($_GET['rate'] != ''){ $rate = $_GET['rate']; }elseif($_POST['rate'] != ''){ $rate = $_POST['rate']; } if($_GET['last_login'] != ''){ $last_login = $_GET['last_login']; }elseif($_POST['last_login'] != ''){ $last_login = $_POST['last_login']; }
  7. Your method would only produce one checkbox I need something more like this: <?php if($_GET['id'] != ''){ $restaurant_query = mysql_query("SELECT * FROM `restaurant` WHERE approved = 'yes' AND id = $_GET[id]"); $num_rows = mysql_num_rows($restaurant_query); if($num_rows == 0){ print "We don't currently have any restaurants that match your criteria."; }else{ while($restaurant_results = mysql_fetch_assoc($restaurant_query)){ $category_query = mysql_query("SELECT * FROM restaurant_category"); while($category_results = mysql_fetch_assoc($category_query)){ "code to see if restaurant currently has this category" print "<input type=\"checkbox\" name=\"type[]\" value=\"$category_results[id]\" $checked /> $category_results[name]"; } } } } ?>
  8. <?php if($_GET['id'] != ''){ $restaurant_query = mysql_query("SELECT * FROM `restaurant` WHERE approved = 'yes' AND id = $_GET[id]"); $num_rows = mysql_num_rows($restaurant_query); if($num_rows == 0){ print "We don't currently have any restaurants that match your criteria."; }else{ while($restaurant_results = mysql_fetch_assoc($restaurant_query)){ "code for check boxes would go here" } } } ?>
  9. I have a table called restaurant_types that has two fields (restaurant_id and category_id). so basically I make the quert of SELECT * FROM restaurant_types WHERE restaurant_id = (whatever the id of the current restaurant I'm on is such as 4) Let's say the query came up with two results of category_id = 9 and category_id = 8 the check box area should end up looking something like this (note that the categories that came up in the query are checked and the categoris are in alphabetical order): <input type="checkbox" name="type[]" value="9" checked="checked" /> American <input type="checkbox" name="type[]" value="12" /> Bakery <input type="checkbox" name="type[]" value="8" checked="checked" /> BBQ <input type="checkbox" name="type[]" value="18" /> Breakfast <input type="checkbox" name="type[]" value="21" /> Brewery <input type="checkbox" name="type[]" value="1" /> Chinese <input type="checkbox" name="type[]" value="13" /> Coffee/Tea <input type="checkbox" name="type[]" value="3" /> Fast Food <input type="checkbox" name="type[]" value="22" /> Fine Dining <input type="checkbox" name="type[]" value="17" /> German Hope this explains it a little better.
  10. I am working on a CMS for a restaurant guide. The admin section will let users change/add normal restaurant details such as name, phone, description etc... The problem I'm having is figuring out the best way to list a group of check boxes that let's the user select the restaurant category. For example: A restaurant can have multiple categories such as: American food, Chinese, Cafe, Burgers, steaks, fast food etc... I have no problem setting up the database to get this right. The problem I'm running into is what is the best way to query the database and populate the check boxes to be checked or un-checked for a particular restaurant. Hope this makes sense.
  11. I think you need to "fetch" the information from your query. Try <?php include("config.php"); //If they're logged in, ask them if they want to log out if($logged_in=="true") { echo "You're already logged in! <a href=\"logout.php\">Logout?</a>"; } //If not logged in, display the log in form else { //Or the process code if($_GET['act']=='process') { //Put what they inputted into variables $usern = $_POST['usern']; $pw = $_POST['pw']; // Get the pw from that username mysql_select_db("badges") or die(mysql_error()); $qry = mysql_query("SELECT * FROM user WHERE username='$usern'") or die(mysql_error()); while($qry_result = mysql_fetch_assoc($qry)){ //See if they're equal $pas = $qry_result['password']; if ($pas==$pw) { echo "Yay you're logged in!"; } else { echo "failed"; } } } else { //Log in form echo "Here is the log in form."; echo "<form method=\"post\" action=\"login.php?act=process\">Name: <input type=\"text\" maxlength=\"40\" name=\"usern\"><br />"; echo "Password: <input type=\"password\" maxlength=\"20\" name=\"pw\">"; echo "<input type=\"submit\" value=\"Log In\"></form>"; } } ?>
  12. I have a script that I thought was working just fine but it appears to be only working in firefox and not IE. Can anybody take a look at it and tell me if there's anything there that would cause it not to work in IE? Thanks! - Mike <?php include('../site_files/includes/constants.php'); function save_image($file, $id, $sizex, $sizey, $pre){ global $image_path; $image=$file['name']; $userfile_tmp = $file['tmp_name']; $userfile_size = $file['size']; $userfile_type = $file ['type']; if($image){ if($userfile_type == "image/jpg" || $userfile_type == "image/jpeg" || $userfile_type == "image/png" || $userfile_type == "image/gif"){ $max_x = $sizex; $max_y = $sizey; if ($userfile_type == "image/jpg" || $userfile_type == "image/jpeg"){ $img = imagecreatefromjpeg($userfile_tmp); }elseif ($userfile_type == "image/gif"){ $img = imagecreatefromgif($userfile_tmp); }elseif ($userfile_type == "image/png"){ $img = imagecreatefrompng($userfile_tmp); }else{ print "didn't work"; } $imagex = imagesx($img); $imagey = imagesy($img); $dim = max($imagex/$max_x, $imagey/$max_y); $nx = $imagex/$dim; $ny = $imagey/$dim; $image = imagecreatetruecolor($nx, $ny); if ($userfile_type == "image/jpg" || $userfile_type == "image/jpeg"){ imagecopyresampled($image, $img, 0, 0, 0, 0, $nx, $ny, $imagex, $imagey); $image_path = '<img src="http://techguymike.com/window/images/uploads/'.$pre.$id.'.jpg" />'; return imagejpeg($image, '../images/uploads/'.$pre.$id.'.jpg'); }elseif($userfile_type == "image/gif"){ //change the RGB(255, 255, 255) to change background color fill $background_color = imagecolorallocate($image, 255, 255, 255); imagefill($image, 0, 0, $background_color); imagecopyresampled($image, $img, 0, 0, 0, 0, $nx, $ny, $imagex, $imagey); $image_path = '<img src="http://techguymike.com/window/images/uploads/'.$pre.$id.'.gif" />'; return imagegif($image, '../images/uploads/'.$pre.$id.'.gif'); }elseif ($userfile_type == "image/png"){ //change the RGB(255, 255, 255) to change background color fill $background_color = imagecolorallocate($image, 255, 255, 255); imagefill($image, 0, 0, $background_color); imagecopyresampled($image, $img, 0, 0, 0, 0, $nx, $ny, $imagex, $imagey); $image_path = '<img src="http://techguymike.com/window/images/uploads/'.$pre.$id.'.png" />'; return imagepng($image, '../images/uploads/'.$pre.$id.'.png'); } //return $image_path; } } } ?> <?php if (isset($_POST['submit'])=='submit'){ if(isset($_FILES['image']) && $_FILES['image']['name'] != ''){ save_image($_FILES['image'], 14, 250, 300, front); $image_front = $image_path; }else{ print "didn't work"; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <form action="image-upload.php" method="post" enctype="multipart/form-data"> <table class="announcement-form" cellspacing="0"> <tr> <th>Image</th> <td><input type="file" name="image" id="image" size="65" /></td> </tr> <tr> <th> </th> <td><input type="submit" name="submit" value="submit" /></td> </tr> </table> </form> </body> </html>
  13. The problem with this one though is that they aren't always in order it could be qty3, qty7, qty9 rather thean just qty1, qty2, qty3. So I can't just use qty$i. I need to figure out away to put them in an array some how or something.
  14. I want to create multiple records (entries into the database) so it will probably be some sort of foreach loop. example would be: mysql_query("INSERT INTO quote (quote_id, fname, lname, physical_address, physical_city, physical_state, physical_zip, mailing_address, mailing_city, mailing_state, mailing_zip, phone, email) VALUES('', '$first_name', '$last_name', '$address', '$city', '$state', '$zip', '$phone', '$email')"); then mysql_query("IINSERT INTO quote_items(item_id, quote_id, qty, window, width, height, room) VALUES('', 'the quote_id from the quote table', '$_POST['qty1']', '$_POST['window1'], '$_POST['width1'], '$_POST['height1'], '$_POST['room1'])"); mysql_query("IINSERT INTO quote_items(item_id, quote_id, qty, window, width, height, room) VALUES('', 'the quote_id from the quote table', '$_POST['qty2']', '$_POST['window2'], '$_POST['width2'], '$_POST['height2'], '$_POST['room2'])"); and so on. It's a 1 to many relationship (quote table = one) (quote_item table = many) I hope this explnation makes more sense
  15. I have a formthat I want to seperate the information and store the data in two differnt tables but I'm not quite sure how to do it. below I pasted a var_dump on the $_POST of the form in action. (You can see the form here: http://techguymike.com/window/test/new-line.php ) I want to create 1 record in a table called quotes with the information of (first_name, last_name, address, city state zip, phone 1, phone 2, phone 3 and email then I want to create multiple records in a table called quote_items with (qty, window, width, height and room) and if you notice they each incriment such as qty1 qty2 qty3 etc... any ideas on how I can accomplish this? array(30) { ["first_name"]=> string(3) "Bob" ["last_name"]=> string(4) "Dole" ["address"]=> string(0) "" ["city"]=> string(0) "" ["state"]=> string(0) "" ["zip"]=> string(0) "" ["phone_1"]=> string(3) "555" ["phone_2"]=> string(3) "555" ["phone_3"]=> string(4) "5555" ["email"]=> string(13) "bob@yahoo.com" ["qty1"]=> string(1) "3" ["window1"]=> string(6) "Awning" ["width1"]=> string(2) "12" ["height1"]=> string(2) "14" ["room1"]=> string(10) "Location 1" ["qty2"]=> string(1) "5" ["window2"]=> string(6) "Awning" ["width2"]=> string(1) "5" ["height2"]=> string(2) "55" ["room2"]=> string(10) "Location 3" ["qty3"]=> string(2) "45" ["window3"]=> string(11) "French Door" ["width3"]=> string(1) "4" ["height3"]=> string(1) "3" ["room3"]=> string(10) "Location 4" ["qty4"]=> string(1) "3" ["window4"]=> string(25) "3 lite Sliding Patio Door" ["width4"]=> string(2) "33" ["height4"]=> string(1) "3" ["room4"]=> string(10) "Location 1" }
  16. I've changed a bit of my code below <?php if ($_POST['item_count'] == ''){ $item_count = 1; }else{ $item_count = $_POST['item_count']; } ?> <html> <head> </head> <body> <form action="" method="post"> <table cellpadding="5" cellspacing="0"> <tr> <th>#</th> <th>Qty.</th> <th>Window Type</th> <th>Width</th> <th>Height</th> <th>Room Location</th> <th>Manufacture 1</th> <th></th> </tr> <?php if (isset($_POST['add'])=='Add Item'){ $item['$item_count']['qty'] = $_POST['qty']; $item['$item_count']['window'] = $_POST['window']; $item['$item_count']['width']=$_POST['width']; $item['$item_count']['height']=$_POST['height']; $item['$item_count']['room']=$_POST['room']; $item['$item_count']['manufacturer']=$_POST['manufacturer']; print " <tr> <td> </td> <td>".$item['$item_count']['qty']."</td> <td>".$item['$item_count']['window']."</td> <td>".$item['$item_count']['width']."</td> <td>".$item['$item_count']['height']."</td> <td>".$item['$item_count']['room']."</td> <td>".$item['$item_count']['manufacturer']."</td> </tr>\n"; $item_count = $item_count +1; } ?> <tr bgcolor="#ececec"> <td><?php print "$item_count"; ?></td> <td><input type="text" size="3" name="qty" value="" /></td> <td> <select name="window"> <option value="">...Choose</option> <option value="Window 1">A - Slider (left to right)</option> <option value="Window 2"> Slider (right to left)</option> <option value="Window 3">3 lite slider</option> <option value="Window 4">Picture Window</option> <option value="Round Top">Round Top</option> <option value="Single Hung">Single Hung</option> <option value="Garden Window">Garden Window</option> <option value="Bay Window">Bay Window</option> <option value="Casement">Casement</option> <option value="Awning">Awning</option> <option value="Sliding Glass Doors">Sliding Glass Doors</option> <option value="3 lite Sliding Patio Door">3 lite Sliding Patio Door</option> <option value="French Door">French Door</option> </select> </td> <td><input type="text" size="8" name="width" value="" /></td> <td><input type="text" size="8" name="height" value="" /></td> <td> <select name="room"> <option value="">...Choose</option> <option value="Location 1">Bedroom</option> <option value="Location 2">Living/Family Room</option> <option value="Location 3">Dinning Room</option> <option value="Location 4">Kitchen</option> <option value="Location 4">Utility Room</option> <option value="Location 4">Garage</option> </select> </td> <td> <select name="manufacturer"> <option value="">...Choose</option> <option value="Manufacture 1">Cascade Windows</option> <option value="Manufacture 2">Certainteed Windows</option> <option value="Manufacture 3">Comfort Design Inc.</option> <option value="Manufacture 4">Empire Pacific Windows</option> <option value="Manufacture 5">LBL Windows</option> <option value="Manufacture 6">Marvin Windows</option> <option value="Manufacture 7">Milgard Windows</option> </select> </td> <td><input type="submit" name="add" value="Add Item" /></td> </tr> <tr><td colspan="8"><input type="submit" value="submit" /></td></tr> </table> <input type="hidden" name="item_count" value="<?php print $item_count; ?>" /> </form> </body> </html> Can I put this part into an array and pass it each time I add a new item some how? $item['$item_count']['qty'] = $_POST['qty']; $item['$item_count']['window'] = $_POST['window']; $item['$item_count']['width']=$_POST['width']; $item['$item_count']['height']=$_POST['height']; $item['$item_count']['room']=$_POST['room']; $item['$item_count']['manufacturer']=$_POST['manufacturer'];
  17. I put that code that you suggested here: http://tutorialstuff.com/test/line-add.php and it didn't work.
  18. I'm actually ok with having the page submit dynamically with ajax would be nice but is not necessary. Here's what my code looks like: <?php if ($_POST['item_count'] == ''){ $item_count = 1; }else{ $item_count = $_POST['item_count']; } ?> <html> <head> </head> <body> <form action="" method="post"> <table cellpadding="5" cellspacing="0"> <tr> <th>#</th> <th>Qty.</th> <th>Window Type</th> <th>Width</th> <th>Height</th> <th>Room Location</th> <th>Manufacture 1</th> <th></th> </tr> <?php if (isset($_POST['add'])=='Add Item'){ $item_count = $item_count +1; print " <tr> <td>$_POST[item_count]</td> <td>$_POST[qty]</td> <td>$_POST[window]</td> <td>$_POST[width]</td> <td>$_POST[height]</td> <td>$_POST[room]</td> <td>$_POST[manufacturer]</td> </tr>\n"; } ?> <tr bgcolor="#ececec"> <td><?php print "$item_count"; ?></td> <td><input type="text" size="3" name="qty" value="" /></td> <td> <select name="window"> <option value="">...Choose</option> <option value="Window 1">A - Slider (left to right)</option> <option value="Window 2"> Slider (right to left)</option> <option value="Window 3">3 lite slider</option> <option value="Window 4">Picture Window</option> <option value="Round Top">Round Top</option> <option value="Single Hung">Single Hung</option> <option value="Garden Window">Garden Window</option> <option value="Bay Window">Bay Window</option> <option value="Casement">Casement</option> <option value="Awning">Awning</option> <option value="Sliding Glass Doors">Sliding Glass Doors</option> <option value="3 lite Sliding Patio Door">3 lite Sliding Patio Door</option> <option value="French Door">French Door</option> </select> </td> <td><input type="text" size="8" name="width" value="" /></td> <td><input type="text" size="8" name="height" value="" /></td> <td> <select name="room"> <option value="">...Choose</option> <option value="Location 1">Bedroom</option> <option value="Location 2">Living/Family Room</option> <option value="Location 3">Dinning Room</option> <option value="Location 4">Kitchen</option> <option value="Location 4">Utility Room</option> <option value="Location 4">Garage</option> </select> </td> <td> <select name="manufacturer"> <option value="">...Choose</option> <option value="Manufacture 1">Cascade Windows</option> <option value="Manufacture 2">Certainteed Windows</option> <option value="Manufacture 3">Comfort Design Inc.</option> <option value="Manufacture 4">Empire Pacific Windows</option> <option value="Manufacture 5">LBL Windows</option> <option value="Manufacture 6">Marvin Windows</option> <option value="Manufacture 7">Milgard Windows</option> </select> </td> <td><input type="submit" name="add" value="Add Item" /></td> </tr> <tr><td colspan="8"><input type="submit" value="submit" /></td></tr> </table> <input type="hidden" name="item_count" value="<?php print $item_count; ?>" /> </form> </body> </html>
  19. This is what I want (http://tutorialstuff.com/test/formsmall.php) except I want the items to stay in the table instead of dissipater and then submit it all at once like you were saying. BTW the link in this post is different than the one up top. -Mike
  20. I have a form in which users can add as many items to it as they want and I am stuck on how to do this. I want the form to look like this (http://tutorialstuff.com/test/formsmall.html) where there is only one line of form fields and each time they click add item it adds the item to a table above the form and when they are all done adding items and filling out the rest of the info they click submit and send the info to the database. How would I go about doing this? I don’t want any of the information submitted to the database until after they hit the submit button not the add item button. Any help would be appreciated! Thanks - Mike
  21. I've written a function that creates uses an array over and over so if I want to use that same array in different context such as a list or for a drop down menu all I have to do is call the function and declare an open tag and closing tag, but sometimes I might want to use a value with that function that prints out the array name but I'm having a hard time figuring out how. Maybe somebody can help. You can see a live demo at: http://tutorialstuff.com/test/arrays.php and the code is below. Thanks - Mike <?php function rooms($open, $close){ $rooms = array('Bedroom','Living/Family Room','Dinning Room','Kitchen','Utility Room','Garage'); $i = 0; while($rooms[$i]){ print "$open$rooms[$i]$close"; $i++; } } print rooms("<b>", "</b><br />\n"); ?> <form> <select> <?php print rooms("<option value=\"$rooms[$i]\">", "</option>\n"); ?> </select> </form>
  22. Well I'm working on a form that eventually will have the data submitted to a database. I have everything working properly and the wa I want it to for now, it just seems like I have taken the long way around to get to where I want. Can anybody look at my php code and tell me how I can clean it up? Thanks! <?php include'../../connections/townnews.php'; mysql_select_db("tdn_com",$db); function safe($val){ if (is_array($val)){ foreach($val as $key => $v) $val[$key] = safe($v); return $val; } else { if (get_magic_quotes_gpc()) $val = stripslashes($val); return mysql_real_escape_string($val); } } $_POST = safe($_POST); $_GET = safe($_GET); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script type="text/javascript" src="calendarDateInput.js"></script> </head> <body> <?php $section = htmlspecialchars(stripslashes($_POST['section'])); $name = htmlspecialchars(stripslashes($_POST['name'])); $assignmentdate = htmlspecialchars(stripslashes($_POST['assignmentdate'])); $wording = htmlspecialchars(stripslashes($_POST['wording'])); $wording = str_replace("rn", "<br />", $wording); print " $section<br /> $name<br /> $assignmentdate<br /> $wording"; ?> <form action="index.php" method="post"> <select name="section"> <?php $announcement_type_query = mysql_query("SELECT * FROM `announcment_type` ORDER BY `section` ASC"); while($announcement_type_results=mysql_fetch_assoc($announcement_type_query)){ print"<option value=\"$announcement_type_results[announcment_type_id]\">$announcement_type_results[section]</option>"; } ?> </select> <input type="text" name="name" value="" /> <script>DateInput('assignmentdate', true, 'MM/DD/YYYY')</script> <textarea name="wording"></textarea> <input type="submit" value="submit" /> </form> </body> </html>
  23. Well I was hoping someone could help me find some tutorials or newb help on using the rewriterule for apache and maybe using it with pagination. I want my page urls to be able to go from something like: domain.com/index.php?page=2&num=10 to something more like this domain.com/page/2/ or something of this nature. Any and all help would be appreciated. Thanks - Mike
×
×
  • 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.