Jump to content

Search the Community

Showing results for tags 'php'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

  1. I just want to know if there are any websites out there that i can upload an html file and a php3 file and have it enable the php3 host.
  2. need to create a webapp using a control to display each event, have difficulty with path to get the position and column attribute. any help and how do i bind a control to this data to make it an app where a use can browse through each event with there corresponding characteristics? below is the sample xml..... thanks <?php $keywords = simplexml_load_file('http://wx.toronto.ca/festevents.nsf/tpaview?readviewentries'); echo ' '; foreach ($keywords->xpath('viewentry[@position]') as $kw) { echo ' ' .$kw->entrydata->text . ' '; } //echo ' '; //foreach ($keywords->viewentry->entrydata as $kw) { //echo ' '.$kw->text.''; //echo ' '.$kw->textlist->text.''; //} ?> <?xml version="1.0" encoding="UTF-8"?> <viewentries timestamp="20140420T142611,65Z" toplevelentries="1209"> <viewentry position="1" unid="9FBAD6EEF554FC2185257CBB0063FDD0" noteid="4E072" siblings="1209"> <entrydata columnnumber="0" name="EventName"> <text> ‘Antiques Roadshow’-inspired Open Call for Canadian Art </text> </entrydata> <entrydata columnnumber="1" name="Area"> <text>Downtown</text> </entrydata> <entrydata columnnumber="2" name="CategoryList"> <textlist> <text>Arts/Exhibits</text> <text>Seminars/Workshops</text> </textlist> </entrydata> <entrydata columnnumber="3" name="PresentedByOrgName"> <text>Consignor Canadian Fine Art</text> </entrydata> <entrydata columnnumber="4" name="Image"> <text> http://wx.toronto.ca/festevents.nsf/all/9FBAD6EEF554FC2185257CBB0063FDD0/$File/logo_banner.png </text> </entrydata> <entrydata columnnumber="5" name="DateBeginShow"> <text>May 9, 2014</text> </entrydata> <entrydata columnnumber="6" name="TimeBegin"> <text>9:00 AM</text> </entrydata> <entrydata columnnumber="7" name="DateEndShow"> <text>May 9, 2014</text> </entrydata> <entrydata columnnumber="8" name="TimeEnd"> <text>5:00 PM</text> </entrydata> <entrydata columnnumber="9" name="Admission"> <text>Free</text> </entrydata> <entrydata columnnumber="10" name="LongDesc"> <textlist> <text> Have you ever wondered how much that inherited painting tucked away in the attic is worth? Consignor Canadian Fine Art’s (consignor.ca) certified art specialists are looking for hidden treasures for their upcoming auctions. Anyone interested in selling a Canadian painting, print or sculpture on consignment, receiving a preliminary auction valuation and/or curious to learn more about a piece of artwork they own, is invited to attend an art appraisal open house on Friday, May 9th. </text> <text> Consignor’s art specialists will be on-hand for mini-consultations and verbal auction valuations of works by Canadian artists, as well as preview works of art available for sale through its upcoming Spring Auction of Important Canadian Art (May 21-29). </text> </textlist> </entrydata> <entrydata columnnumber="11" name="OrgContactPhone"> <text>416-628-5609</text> </entrydata> <entrydata columnnumber="12" name="OrgContactExt"> <text/> </entrydata> <entrydata columnnumber="13" name="Location"> <text>Consignor Canadian Fine Art</text> </entrydata> <entrydata columnnumber="14" name="Intersection"> <text>Dundas St. W and McCaul St.</text> </entrydata> <entrydata columnnumber="15" name="MapAddress"> <text> [<a href=http://map.toronto.ca/imapit/iMapIt.jsp?app=TOMaps&geoid=796553 target=_new>Map to this event</a>] </text> </entrydata> <entrydata columnnumber="16" name="TTC"> <text/> </entrydata> <entrydata columnnumber="17" name="EventURL"> <text>www.consignor.ca</text> </entrydata> <entrydata columnnumber="18" name="ImageAltText"> <text/> </entrydata> <entrydata columnnumber="19" name="OrgContactEMail"> <text>amcloughlin@holmespr.com</text> </entrydata> <entrydata columnnumber="20" name="AccessibleFully"> <text/> </entrydata> <entrydata columnnumber="21" name="ParkingFree"> <text/> </entrydata> <entrydata columnnumber="22" name="PublicWashrooms"> <text>Public washrooms</text> </entrydata> <entrydata columnnumber="23" name="AccessiblePartially"> <text/> </entrydata> <entrydata columnnumber="24" name="ParkingPaid"> <text>Parking (paid)</text> </entrydata> <entrydata columnnumber="25" name="FoodBeverage"> <text/> </entrydata> <entrydata columnnumber="26" name="Shopping"> <text/> </entrydata> <entrydata columnnumber="27" name="Exhibit"> <text/> </entrydata> <entrydata columnnumber="28" name="Performance"> <text/> </entrydata> <entrydata columnnumber="29" name="KidFriendly"> <text>Kid-friendly</text> </entrydata> <entrydata columnnumber="30" name="History"> <text/> </entrydata> <entrydata columnnumber="31" name="Green"> <text/> </entrydata> <entrydata columnnumber="32" name="NewThisYear"> <text/> </entrydata> <entrydata columnnumber="33" name="Reservations"> <text/> </entrydata> <entrydata columnnumber="34" name="OfficialGreenSite"> <text/> </entrydata> <entrydata columnnumber="35" name="BikeRacks"> <text/> </entrydata> <entrydata columnnumber="36" name="RoadClose"> <text/> </entrydata> <entrydata columnnumber="37" name="OrganicFood"> <text/> </entrydata> </viewentry> <viewentry position="2" unid="05618376115EB38B85257CB00063C61E" noteid="4D5AE" siblings="1209"> <entrydata columnnumber="0" name="EventName"> <text>Tour the PS Trillium Side Wheeler Paddle Steamer</text> </entrydata> <entrydata columnnumber="1" name="Area"> <text>Downtown</text> </entrydata> <entrydata columnnumber="2" name="CategoryList"> <text>History</text> </entrydata> <entrydata columnnumber="3" name="PresentedByOrgName"> <text>The Waterfont BIA</text> </entrydata> <entrydata columnnumber="4" name="Image"> <text> http://wx.toronto.ca/festevents.nsf/all/05618376115EB38B85257CB00063C61E/$File/Trillium Ferry.JPG </text> </entrydata> <entrydata columnnumber="5" name="DateBeginShow"> <text>May 24, 2014</text> </entrydata> <entrydata columnnumber="6" name="TimeBegin"> <text>10:00 AM</text> </entrydata> <entrydata columnnumber="7" name="DateEndShow"> <text>May 25, 2014</text> </entrydata> <entrydata columnnumber="8" name="TimeEnd"> <text>3:00 PM</text> </entrydata> <entrydata columnnumber="9" name="Admission"> <text>Free</text> </entrydata> <entrydata columnnumber="10" name="LongDesc"> <textlist> <text> Take a tour of the PS Trillium Side Wheleer Paddle Steamer at Gangways Open on Toronto’s Waterfront presented by The Waterfront BIA, as part of the 15th annual Doors Open Toronto. </text> <text>Visit www.waterfrontbia.com for more information.</text> <text> The PS Trillium was constructed in 1910 at Polson Iron Works in Toronto, was re-constructed in Port Colborne in 1975 and continues to operate in the rebuilt condition today. The Trillium is the last remaining side wheeler paddle steamer operating in North America and is located at the foot of Harbour Square Park at the base of Bay Street. Author/Journalist Mike Filey will be on board to answer questions when he is not speaking in the Brigantine Room. </text> </textlist> </entrydata> <entrydata columnnumber="11" name="OrgContactPhone"> <text>416-603-6005</text> </entrydata> <entrydata columnnumber="12" name="OrgContactExt"> <text/> </entrydata> <entrydata columnnumber="13" name="Location"> <text>Harbour Square Park</text> </entrydata> <entrydata columnnumber="14" name="Intersection"> <text>Queens Quay West and Rees Street</text> </entrydata> <entrydata columnnumber="15" name="MapAddress"> <text> No matching map link is available for the current address input. </text> </entrydata> <entrydata columnnumber="16" name="TTC"> <text/> </entrydata> <entrydata columnnumber="17" name="EventURL"> <text>www.waterfrontbia.com</text> </entrydata> <entrydata columnnumber="18" name="ImageAltText"> <text/> </entrydata> <entrydata columnnumber="19" name="OrgContactEMail"> <text>peter@ashworthassociates.com</text> </entrydata> <entrydata columnnumber="20" name="AccessibleFully"> <text>Fully accessible</text> </entrydata> <entrydata columnnumber="21" name="ParkingFree"> <text/> </entrydata> <entrydata columnnumber="22" name="PublicWashrooms"> <text>Public washrooms</text> </entrydata> <entrydata columnnumber="23" name="AccessiblePartially"> <text/> </entrydata> <entrydata columnnumber="24" name="ParkingPaid"> <text>Parking (paid)</text> </entrydata> <entrydata columnnumber="25" name="FoodBeverage"> <text/> </entrydata> <entrydata columnnumber="26" name="Shopping"> <text/> </entrydata> <entrydata columnnumber="27" name="Exhibit"> <text/> </entrydata> <entrydata columnnumber="28" name="Performance"> <text/> </entrydata> <entrydata columnnumber="29" name="KidFriendly"> <text>Kid-friendly</text> </entrydata> <entrydata columnnumber="30" name="History"> <text/> </entrydata> <entrydata columnnumber="31" name="Green"> <text/> </entrydata> <entrydata columnnumber="32" name="NewThisYear"> <text>New this year</text> </entrydata> <entrydata columnnumber="33" name="Reservations"> <text/> </entrydata> <entrydata columnnumber="34" name="OfficialGreenSite"> <text/> </entrydata> <entrydata columnnumber="35" name="BikeRacks"> <text/> </entrydata> <entrydata columnnumber="36" name="RoadClose"> <text/> </entrydata> <entrydata columnnumber="37" name="OrganicFood"> <text/> </entrydata> </viewentry> <viewentry position="3" unid="58B01EF4B58CFE1D85257C97007303D5" noteid="4B76E" siblings="1209"> <entrydata columnnumber="0" name="EventName"> <text>10th Annual Toronto Tango Festival</text> </entrydata> <entrydata columnnumber="1" name="Area"> <text>Southwest</text><?xml version="1.0" encoding="UTF-8"?> <viewentries timestamp="20140420T142611,65Z" toplevelentries="1209"> <viewentry position="1" unid="9FBAD6EEF554FC2185257CBB0063FDD0" noteid="4E072" siblings="1209"> <entrydata columnnumber="0" name="EventName"> <text> ‘Antiques Roadshow’-inspired Open Call for Canadian Art </text> </entrydata> <entrydata columnnumber="1" name="Area"> <text>Downtown</text> </entrydata> <entrydata columnnumber="2" name="CategoryList"> <textlist> <text>Arts/Exhibits</text> <text>Seminars/Workshops</text> </textlist> </entrydata> <entrydata columnnumber="3" name="PresentedByOrgName"> <text>Consignor Canadian Fine Art</text> </entrydata> <entrydata columnnumber="4" name="Image"> <text> http://wx.toronto.ca/festevents.nsf/all/9FBAD6EEF554FC2185257CBB0063FDD0/$File/logo_banner.png </text> </entrydata> <entrydata columnnumber="5" name="DateBeginShow"> <text>May 9, 2014</text> </entrydata> <entrydata columnnumber="6" name="TimeBegin"> <text>9:00 AM</text> </entrydata> <entrydata columnnumber="7" name="DateEndShow"> <text>May 9, 2014</text> </entrydata> <entrydata columnnumber="8" name="TimeEnd"> <text>5:00 PM</text> </entrydata> <entrydata columnnumber="9" name="Admission"> <text>Free</text> </entrydata> <entrydata columnnumber="10" name="LongDesc"> <textlist> <text> Have you ever wondered how much that inherited painting tucked away in the attic is worth? Consignor Canadian Fine Art’s (consignor.ca) certified art specialists are looking for hidden treasures for their upcoming auctions. Anyone interested in selling a Canadian painting, print or sculpture on consignment, receiving a preliminary auction valuation and/or curious to learn more about a piece of artwork they own, is invited to attend an art appraisal open house on Friday, May 9th. </text> <text> Consignor’s art specialists will be on-hand for mini-consultations and verbal auction valuations of works by Canadian artists, as well as preview works of art available for sale through its upcoming Spring Auction of Important Canadian Art (May 21-29). </text> </textlist> </entrydata> <entrydata columnnumber="11" name="OrgContactPhone"> <text>416-628-5609</text> </entrydata> <entrydata columnnumber="12" name="OrgContactExt"> <text/> </entrydata> <entrydata columnnumber="13" name="Location"> <text>Consignor Canadian Fine Art</text> </entrydata> <entrydata columnnumber="14" name="Intersection"> <text>Dundas St. W and McCaul St.</text> </entrydata> <entrydata columnnumber="15" name="MapAddress"> <text> [<a href=http://map.toronto.ca/imapit/iMapIt.jsp?app=TOMaps&geoid=796553 target=_new>Map to this event</a>] </text> </entrydata> <entrydata columnnumber="16" name="TTC"> <text/> </entrydata> <entrydata columnnumber="17" name="EventURL"> <text>www.consignor.ca</text> </entrydata> <entrydata columnnumber="18" name="ImageAltText"> <text/> </entrydata> <entrydata columnnumber="19" name="OrgContactEMail"> <text>amcloughlin@holmespr.com</text> </entrydata> <entrydata columnnumber="20" name="AccessibleFully"> <text/> </entrydata> <entrydata columnnumber="21" name="ParkingFree"> <text/> </entrydata> <entrydata columnnumber="22" name="PublicWashrooms"> <text>Public washrooms</text> </entrydata> <entrydata columnnumber="23" name="AccessiblePartially"> <text/> </entrydata> <entrydata columnnumber="24" name="ParkingPaid"> <text>Parking (paid)</text> </entrydata> <entrydata columnnumber="25" name="FoodBeverage"> <text/> </entrydata> <entrydata columnnumber="26" name="Shopping"> <text/> </entrydata> <entrydata columnnumber="27" name="Exhibit"> <text/> </entrydata> <entrydata columnnumber="28" name="Performance"> <text/> </entrydata> <entrydata columnnumber="29" name="KidFriendly"> <text>Kid-friendly</text> </entrydata> <entrydata columnnumber="30" name="History"> <text/> </entrydata> <entrydata columnnumber="31" name="Green"> <text/> </entrydata> <entrydata columnnumber="32" name="NewThisYear"> <text/> </entrydata> <entrydata columnnumber="33" name="Reservations"> <text/> </entrydata> <entrydata columnnumber="34" name="OfficialGreenSite"> <text/> </entrydata> <entrydata columnnumber="35" name="BikeRacks"> <text/> </entrydata> <entrydata columnnumber="36" name="RoadClose"> <text/> </entrydata> <entrydata columnnumber="37" name="OrganicFood"> <text/> </entrydata> </viewentry> <viewentry position="2" unid="05618376115EB38B85257CB00063C61E" noteid="4D5AE" siblings="1209"> <entrydata columnnumber="0" name="EventName"> <text>Tour the PS Trillium Side Wheeler Paddle Steamer</text> </entrydata> <entrydata columnnumber="1" name="Area"> <text>Downtown</text> </entrydata> <entrydata columnnumber="2" name="CategoryList"> <text>History</text> </entrydata> <entrydata columnnumber="3" name="PresentedByOrgName"> <text>The Waterfont BIA</text> </entrydata> <entrydata columnnumber="4" name="Image"> <text> http://wx.toronto.ca/festevents.nsf/all/05618376115EB38B85257CB00063C61E/$File/Trillium Ferry.JPG </text> </entrydata> <entrydata columnnumber="5" name="DateBeginShow"> <text>May 24, 2014</text> </entrydata> <entrydata columnnumber="6" name="TimeBegin"> <text>10:00 AM</text> </entrydata> <entrydata columnnumber="7" name="DateEndShow"> <text>May 25, 2014</text> </entrydata> <entrydata columnnumber="8" name="TimeEnd"> <text>3:00 PM</text> </entrydata> <entrydata columnnumber="9" name="Admission"> <text>Free</text> </entrydata> <entrydata columnnumber="10" name="LongDesc"> <textlist> <text> Take a tour of the PS Trillium Side Wheleer Paddle Steamer at Gangways Open on Toronto’s Waterfront presented by The Waterfront BIA, as part of the 15th annual Doors Open Toronto. </text> <text>Visit www.waterfrontbia.com for more information.</text> <text> The PS Trillium was constructed in 1910 at Polson Iron Works in Toronto, was re-constructed in Port Colborne in 1975 and continues to operate in the rebuilt condition today. The Trillium is the last remaining side wheeler paddle steamer operating in North America and is located at the foot of Harbour Square Park at the base of Bay Street. Author/Journalist Mike Filey will be on board to answer questions when he is not speaking in the Brigantine Room. </text> </textlist> </entrydata> <entrydata columnnumber="11" name="OrgContactPhone"> <text>416-603-6005</text> </entrydata> <entrydata columnnumber="12" name="OrgContactExt"> <text/> </entrydata> <entrydata columnnumber="13" name="Location"> <text>Harbour Square Park</text> </entrydata> <entrydata columnnumber="14" name="Intersection"> <text>Queens Quay West and Rees Street</text> </entrydata> <entrydata columnnumber="15" name="MapAddress"> <text> No matching map link is available for the current address input. </text> </entrydata> <entrydata columnnumber="16" name="TTC"> <text/> </entrydata> <entrydata columnnumber="17" name="EventURL"> <text>www.waterfrontbia.com</text> </entrydata> <entrydata columnnumber="18" name="ImageAltText"> <text/> </entrydata> <entrydata columnnumber="19" name="OrgContactEMail"> <text>peter@ashworthassociates.com</text> </entrydata> <entrydata columnnumber="20" name="AccessibleFully"> <text>Fully accessible</text> </entrydata> <entrydata columnnumber="21" name="ParkingFree"> <text/> </entrydata> <entrydata columnnumber="22" name="PublicWashrooms"> <text>Public washrooms</text> </entrydata> <entrydata columnnumber="23" name="AccessiblePartially"> <text/> </entrydata> <entrydata columnnumber="24" name="ParkingPaid"> <text>Parking (paid)</text> </entrydata> <entrydata columnnumber="25" name="FoodBeverage"> <text/> </entrydata> <entrydata columnnumber="26" name="Shopping"> <text/> </entrydata> <entrydata columnnumber="27" name="Exhibit"> <text/> </entrydata> <entrydata columnnumber="28" name="Performance"> <text/> </entrydata> <entrydata columnnumber="29" name="KidFriendly"> <text>Kid-friendly</text> </entrydata> <entrydata columnnumber="30" name="History"> <text/> </entrydata> <entrydata columnnumber="31" name="Green"> <text/> </entrydata> <entrydata columnnumber="32" name="NewThisYear"> <text>New this year</text> </entrydata> <entrydata columnnumber="33" name="Reservations"> <text/> </entrydata> <entrydata columnnumber="34" name="OfficialGreenSite"> <text/> </entrydata> <entrydata columnnumber="35" name="BikeRacks"> <text/> </entrydata> <entrydata columnnumber="36" name="RoadClose"> <text/> </entrydata> <entrydata columnnumber="37" name="OrganicFood"> <text/> </entrydata> </viewentry> <viewentry position="3" unid="58B01EF4B58CFE1D85257C97007303D5" noteid="4B76E" siblings="1209"> <entrydata columnnumber="0" name="EventName"> <text>10th Annual Toronto Tango Festival</text> </entrydata> <entrydata columnnumber="1" name="Area"> <text>Southwest</text>
  3. Hi All, I am struggling to get the correct information from mysql db to my php page. My page has an Index page: Like this: index.php: <?php require "dbinfo.php"; $sql="SELECT * FROM stats"; $result = mysql_query($sql, $db) or die (mysql_error()); $pageTitle = "My Stats Database"; include "header.php"; print <<<HERE <h2> My Contacts</h2> Select a Record to update <a href="addstat.php"> add new stat</a>. <table id="home"> HERE; while ($row=mysql_fetch_array($result)){ $id=$row["id"]; $type=$row["type"]; $depthead=$row["depthead"]; $person=$row["person"]; $descr=$row["descr"]; $recdate=$row["recdate"]; $tolog=$row["tolog"]; $senttorev=$row["senttorev"]; $recfromrev=$row["recfromrev"]; print <<<HERE <tr> <td> <form method="POST" action="updateform.php"> <input type="hidden" name="sel_record" value="$id"> <input type="submit" name="update" value=" Edit " </form> </td> <td><strong> Description: </strong>$descr,<p> <strong>Type: </strong>$type</p> <p><strong> Department Head: </strong>$depthead</p> <strong> Test Analyst: </strong> $person<br/></td> HERE; } print "</tr></table></body></html>"; ?> Then it has the actual adding of the stats: Here: addstats.php: <?php if($_POST['submit']="Submit") //if(isset($_POST['submit'])) { $type = cleanData($_POST['type']); $depthead = cleanData($_POST['depthead']); $person = cleanData($_POST['person']); $descr = cleanData($_POST['descr']); $recdate = cleanData($_POST['recdate']); $tolog = cleanData($_POST['tolog']); $senttorev = cleanData($_POST['senttorev']); $recfromrev = cleanData($_POST['recfromrev']); //print "Data Cleaned"; addData($type, $depthead, $person, $descr, $recdate, $tolog, $senttorev, $recfromrev); } else { printForm(); } function cleanData($data){ $data = trim($data); $data = stripcslashes($data); $data = htmlspecialchars($data); $data = strip_tags($data); return $data; } function addData ($type, $depthead, $person, $descr, $recdate, $tolog, $senttorev, $recfromrev) { //print "ready to add data"; include("dbinfo.php"); include("header.php"); $sql="INSERT INTO stats VALUES (null, '$type', '$depthead', '$person', '$descr', '$recdate', '$tolog', '$senttorev', '$recfromrev')"; $result=mysql_query($sql) or die(mysql_error()); print <<<HERE <h1>You have added the following</h1> <ul> <li> Type: $type</li> <li> Deptartment Head: $depthead</li> <li> Test Analyst: $person</li> <li> Description: $descr</li> <li> Received Date: $recdate</li> <li> Date to log: $tolog</li> <li> Sent to Rev: $senttorev</li> <li> Received from Revision : $recfromrev</li> </ul> HERE; } function printform(){ $pagetitle = "Add Stats"; include("header.php"); print <<<HERE <h2>Add Stats Here</h2> <form id = "stats" method ="POST"> <div> <label for = "type" >Type*:</label> <input type = "text" name = "type" id = "type" required = "required"> </div> <p> </p> <div> <label for = "depthead" >Department Head*:</label> <input type = "text" name = "depthead" id = "depthead" required = "required"> </div> <p> </p> <div> <label for = "person" >Test Analyst*:</label> <input type = "text" name = "person" id = "person" required = "required"> </div> <p> </p> <div> <label for = "descr" >Description*:</label> <input type = "text" name = "descr" id = "descr" required = "required"> </div> <p> </p> <div> <label for = "recdate" >Date Received*:</label> <input type = "text" name = "recdate" id = "recdate" required = "required"> </div> <p> </p> <div> <label for = "tolog" >Date to log*:</label> <input type = "text" name = "tolog" id = "tolog" required = "required"> </div> <p> </p> <div> <label for = "senttorev" >Sent to Rev:</label> <input type = "text" name = "senttorev" id = "senttorev" required = "required"> </div> <p> </p> <div> <label for = "recfromrev" >Received from Rev*:</label> <input type = "text" name = "recfromrev" id = "recfromrev" required = "required"> </div> <p> </p> <div id="mySubmit"> <input type="submit" name="submit" value="Submit"> </div> </form> HERE; } ?> Then it has the updating of the stats: updateform.php this is where I am stuck beyond belief: <?php require"dbinfo.php"; $sel_record = $_POST['sel_record']; //$sel_record = (isset($_POST['sel_record'])) ? $_POST['sel_record'] : ''; $sql = "SELECT * FROM stats WHERE id = '$sel_record'"; //execute sql query and get result $result = mysql_query($sql, $db) or die (mysql_error()); if (!$result) { print "<h1> Something went wrong!</h1>"; } else { //begin while loop while ($record = mysql_fetch_array($result, MYSQL_ASSOC)){ $id = $record['id']; $type = $record['type']; $depthead = $record['depthead']; $person = $record["person"]; $descr = $record["descr"]; $recdate = $record["recdate"]; $tolog = $record["tolog"]; $senttorev = $record["senttorev"]; $recfromrev = $record["recfromrev"]; } } //end while loop $pagetitle = "Edit Stat"; include "header.php"; print <<<HERE <h2> Modify this Stat</h2> <p> Change the values in the boxes and click "Modify Record" button </p> <form id="myform" method="POST" action="update.php"> <input type="hidden" name="id" value="$id"> <div> <label for="type">Type*:</label> <input type="text" name="type" id="type" value="$type"> </div> <p> </p> <div> <label for = "depthead" >Department Head*:</label> <input type = "text" name = "depthead" id = "depthead" value = "$depthead"> </div> <p> </p> <div> <label for="person">Test Analyst*:</label> <input type="text" name="person" id="person" value="$person"> </div> <p> </p> <div> <label for="descr">Description*:</label> <input type="text" name="descr" id="descr" value="$descr"> </div> <p> </p> <div> <label for="recdate">Date Received*:</label> <input type="text" name="recdate" id="recdate" value="$recdate"> </div> <p> </p> <div> <label for="tolog">Date to log*:</label> <input type="text" name="tolog" id="tolog" value="$tolog"> </div> <p> </p> <div> <label for="senttorev">Sent to Rev:</label> <input type="text" name="senttorev" id="senttorev" value="$senttorev"> </div> <p> </p> <div> <label for="recfromrev">Received from Rev*:</label> <input type="text" name="recfromrev" id="recfromrev" value="$recfromrev"> </div> <p> </p> <div id="mySubmit"> <input type="submit" name="submit" value="Modify Record"> </div> </form> HERE; ?> and the then update portion itself: <?php include "dbinfo.php"; $id = $_POST['id']; $type = $_POST['type']; $depthead = $_POST['depthead']; $person = $_POST['person']; $descr=$_POST['descr']; $recdate=$_POST['recdate']; $tolog=$_POST['tolog']; $senttorev=$_POST['senttorev']; $recfromrev=$_POST['recfromrev']; $sql="UPDATE stats SET type='$type', depthead='$depthead', person='$person', descr='$descr', recdate='$recdate', tolog='$tolog', senttorev='$senttorev', recfromrev='$recfromrev' WHERE id='$id' "; $result=mysql_query($sql) or die (mysql_error()); print "<html><head><title>Update Results</titlel></head><body>"; include "header.php"; print <<<HERE <h1>The new Record looks like this: </h1> <td> <p><strong>Type: </strong>$type</p> <p><strong>Department Head: </strong>$depthead</p> <p><strong>Test Analyst: </strong> $person</p> <p><strong>Description: </strong>$descr</p> <p><strong>Received Date:</strong>$recdate</p> <p><strong>Date to Log:</strong>$tolog</p> <p><strong>Sent to rev:</strong>$senttorev</p> <p><strong>Received from Rev:</strong>$recfromrev</p> <br/> HERE; My problem is when I select the "edit" record on the index.php page I get the wrong information to my updateform.php screen. I don't know why, I have tried everything that I know of. Does not matter which record I select I keep on getting the same numbered one. Please see fi you can help me with this? Thanking you in advance.
  4. I have a database with a lot of items in it for a webshop, and i want to use radiobuttons connected to the items in the database, is there a way to do that or do i have to do it in a different manner?
  5. Seeking help setting up a secure page for Login and Registration Pages. The trouble I have is I have hosting on streamline.net my non secure site is on (http://www.teknikaltim.co.uk) but If I create a login page that has the action set to my ssl hosting (https://teknikaltim.ssl-01.com/) the links will break also I heard it's not good practice to encrypt every page due to loading times. I paid my hosting provider £30 for ssl and it's not working as I hoped it would IE have https://teknikaltim.co.uk/login/ . This is going to make keeping sessions between the secure pages and non secure pages difficult? Another Problem I have is the ssl site has PHP Version 5.1.2. And I have loads of classes that preferably I would only want to load the ones I need in an auto loader but I get an Unexpected Function or ( in init.php on line 17 for the time being I have changed the code to include the classes but not all. The pages I would like to make secure are: http://www.teknikaltim.co.uk/login http://www.teknikaltim.co.uk/register http://www.teknikaltim.co.uk/servicecalls they all transmit personal details i.e. Usernames, Names,Surnames,Email Addresses, passwords etc I am wanting to learn so not looking for someone to do it for me but to point me in the right direction Many thanks
  6. Dear Forum Members, I'm trying to create a snippet of PHP code which can select a specific number of rows from a Database table (Database "formulier", "tables under invoer"), and output this data into a .cvs file. The script: export.php This script will be running on a website, where after people click on a button and submit a client-specfic ID and Last Name, they get a .csv to download for administrative use. Needless to say, I want the script to generate a .csv file with all entries (different dates of entries, total 23 variables) of one ID-number from the database. I've started to work on this, and whilst it works for the larger part, I'm really stuck at the moment. I hope that some of you can shed some light on the issue. Attached are the scripts I'm currently running. formulier.htmlinsert.php Please note that they're definetly not final, and still insecure. That's not the issue right now. Kind regards,
  7. <script> $('.add_to').click(function(){ //alert(1); productId= $(this).attr('id'); //var grandTotal= $('#grandTotal').html(''); $('#sucessAdd').html('<img src="images/ajax-loader.gif" align="center" />'); //var grandTotalfloat= parseFloat(grandTotal); $.ajax({ type: "POST", url:"pass.php", data: {action:'addCatalog',productId:productId}, success:function(result){ //alert(result) if(result==1){//add_to_cat $('#'+productId).remove(); $('#'+productId).fadeTo("fast", .5); $('#sucessAdd').html(''); //$('#sucessAdd').css('color','green'); $('#sucessAdd').addClass('add-sucess'); $('#sucessAdd_'+productId).html('<font coloe="red"><b>Add Successfully</b></font>'); $("#"+productId).style.display="block"; } } }) }); </script> <div class="items_box_link"> <a href="#" id="<?php echo $productRow['id'];?>" class="add_to">ADD TO CART</a> </div> ..........................................////////////////////////////............................................ after add to cart, my page goes to top but i want it to remain dere only.. any help!.. thanks.
  8. i need help with a login i have on my site. I'm new to this so i dont know if i'll get any help
  9. Right now I am using a session to get search's input terms and place them into meta tags(title). It works; the only issue is that the search terms lag 1 page behind. For eg. If i search "flowers" on first try, it will show flowers in the metas(title). Next I input "treehouse" in search; instead of "treehouse" showing in the metas, it'll still show me the previous term "flowers". Now if I do a third search with a new term, it won't show the new term in metas, it'll show me the previous term "treehouse". Why is this happening? Am I doing something wrong? This is only an issue with meta tags. Search itself works fine. It shows results on a page as it's suppose to.
  10. I followed a tutorial for making a secure login system for my website, and now when i completed the tutorial it isnt working as it is supposed to. when i click the register page on my site it gives the error code Warning: mysqli::mysqli(): (HY000/1045): Access denied for user 'sec_user'@'localhost' (using password: YES) in C:\wamp\www\gip\includes\db_connect.php on line 3 im a newbie to php so please help me db_connect.php register.php
  11. Hey all, Im trying to create a php script to replicate the following weather radar http://www.bom.gov.au/products/IDR703.loop.shtml they have supplied people with a ftp (it has no user/pass) ftp://ftp2.bom.gov.au/anon/gen/radar/ so this is my code and it wont even connect. <?php $ftp_server = "ftp2.bom.gov.au"; // set up a connection or die $conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server"); ?> I think it might be the ftp itself?
  12. Hey Guys & Girls, Okay, so here's my little issue. I'm running a WordPress site with a custom PHP script using JSON/CURL/API pulling info from an API. All is good in the world in this respect. However, the API listings that are returned are only returned in a 50 item block. The API doesn't allow for more than 50 items per call. So, what I'm looking for is a way to paginate my results so that if there are more than 50 items in the API call, it will allow the user to click to page 2, 3, 4 etc. Here's my code: <?php //functions relating to wordpress go here: //---------------------------------------- $bg_colors = array('green', 'orange', 'blue', 'yellow', 'red', 'black'); //---------------------------------------- //End functions relating to wordpress // Start PetRescue PHP/API Code //---------------------------------------- // Open CuRL/JSON Stuff $ch = curl_init(); $category=$_GET['category']; $url="http://www.myapilink.com.au/api/listings?token=f716909f5d644fe3702be5c7895aa34e&group_id=10046&species=".$category; curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Accept: application/json', 'X-some-API-Key: f716909f5d644fe3702be5c7895aa34e', )); $json = json_decode(curl_exec($ch), true); // Functions relating to the Echo Code foreach($json['listings'] as $listing) { $short_personality=substr($listing['personality'],0,500); $peturl="http://mysiteurl.com.au/beta/pet-info/?petid=".$listing['id']; $medium_photo=$listing['photos'][0]['large_340']; $gallery_listing=$listing['photos'][5]['large_900']; $gender_class=strtolower($listing['gender']); $breed_class=strtolower($listing['species']); $name=($listing['name']); $unique_gallery_name="lightbox['.$inc.']"; $inc++; foreach($listing["photos"] as $photosthumb) { $photo_thumb_large=$photosthumb["large_340"]; $photo_thumb_hidden=$photosthumb["small_80"]; } $rand_background = $bg_colors[array_rand($bg_colors)]; // General IF/AND/ELSE Statements to refine the Echo Output if($listing['photos'] == null) { $medium_photo="http://mysiteurl.com.au/beta/wp-content/themes/Archive/images/photo_coming_soon.png"; } if($listing['desexed'] == "Yes") { $desexed="yes"; } else { $desexed="no"; } if($listing['vaccinated'] == "Yes") { $vaccinated="yes"; } else { $vaccinated="no"; } if($listing['wormed'] == "Yes") { $wormed="yes"; } elseif($listing['wormed'] == "No") { $wormed="no"; } else { $wormed="no"; } if($listing['heart_worm_treated'] == "Yes") { $heart_worm_tested="yes"; } elseif($listing['heart_worm_treated'] == "No") { $heart_worm_tested="no"; } else { $heart_worm_tested="no"; } if($listing['species'] == "Dog") { $adoption_enquiry_link="http://mysiteurl.com.au/beta/pre-adoption-form-dogs/?dog_name=$name"; $hwt="list-$heart_worm_tested"; } elseif($listing['species'] == "Cat") { $adoption_enquiry_link="http://mysiteurl.com.au/beta/pre-adoption-form-cats/?cat_name=$name"; $hwt="list-hwt-hidden"; } // Echo the output echo'<div class="animal"> <div class="animal-image"> <a class="size-thumbnail thickbox" rel="'.$unique_gallery_name.'" href="'.$medium_photo.'"> <img src="'.$medium_photo.'" class="image-with-border" alt=""> <div class="border" style="width: 340px; height: 340px;"> <div class="open"></div> </div> </a> <div class="item-title-bg '.$rand_background.'"> <h2 class="entry-title">'.$listing['name'].'</h2> <div class="animal-adopt-button"> <a href="'.$adoption_enquiry_link.'" style="background-color: #575757; border-color: #494949; background-position:5px 0;" class="button medium">Enquire about '.$name.'</a> </div> </div> </div> <div class="animal-thumbnail hidden"> <a class="lightbox" rel="'.$unique_gallery_name.'" href="'.$photo_thumb_large.'"> <img class="animal-thumbnail" src="'.$photo_thumb_hidden.'" > </a> </div> <div class="animal-content"> <div class="animal-left"> <ul class="animal-list"> <li class="list-sex-'.$gender_class.'">'.$listing['gender'].'</li> <li class="list-breed-'.$breed_class.'">'.$listing['breeds_display'].'</li> <li class="list-age">'.$listing['age'].'</li> <li class="list-fee">'.$listing['adoption_fee'].'</li> </ul> </div> <div class="animal-right"> <ul class="animal-list"> <li class="list-'.$desexed.'">Desexed?</li> <li class="list-'.$vaccinated.'">Vaccinated?</li> <li class="list-'.$wormed.'">Wormed?</li> <li class="'.$hwt.'">Heart Worm Tested?</li> </ul> </div> <div class="animal-full"> <ul class="animal-list"> <li class="list-description">'.$listing['personality'].'</li> </ul> </div></div> <div class="clearer"></div> </div> <div class="delimiter"></div>'; // Close the CURL } curl_close($ch); ?> Attached is some dummy data that represents the JSON data returned from the API. As you can see in the file, the last line is where the paging details comes in. Any help you guys could give would be appreciated. Cheers, Dave listings.txt
  13. I am trying to read a large number of products, from a CSV file. I am attempting to parse each line and produce item lists, each with a Make, Model and set of OEM numbers. Multiple models use the same set of OEM values. Here is a sample screenshot of my product spreadsheet. - http://prntscr.com/3aorwh Here is my code below. Underneath will be my CSV contents (only a sample) error_reporting(0); $file = fopen("new.csv","r"); $makeArray = array(); $make = ''; $model = 0; $specificModel = ''; while(! feof($file)) { $lineVal = fgetcsv($file, 0, '@'); // Adds in 'Make' to initial makeArray array if ( isset($lineVal[0]) && empty( $lineVal[1] ) && empty( $lineVal[2] ) ) { $make = $lineVal[0]; $makeArray[$make] = array(); } // Gets Model lists if ($lineVal[1] !== '') { $model++; $makeArray[$make][$model] = array(); $specificModel = explode(",", $lineVal[1]); foreach($specificModel as $t) { $makeArray[$make][$model][$t] = array(); } } $OEMs = explode(',', $lineVal[2]); foreach($makeArray[$make][$model] as $specific) { if ($specific !== '') { // This loop adds in the variables foreach($OEMs as $oem){ $makeArray[$make][$model][$t][$oem] = array(); } } } } // Echo results echo '<pre>'; var_dump($makeArray) . '<br />'; echo '</pre>'; fclose($file); Here is the CSV content: Brother@@ Brother TN12K Compatible Black Toner Cartridge@HL-4200 Series@TN12BK Brother TN12C Compatible Cyan Toner Cartridge@@TN12C Brother TN12M Compatible Magenta Toner Cartridge@@TN12M Brother TN12Y Compatible Yellow Toner Cartridge@@TN12Y Brother TN04K Compatible Black Toner Cartridge, For HL-2700,@HL-2700CN,MFC-9420CN@TN04BK Brother TN04C Compatible Cyan Toner Cartridge, For HL-2700,@@TN04C Brother TN04M Compatible Magenta Toner Cartridge@@TN04M Brother TN04Y Compatible Yellow Toner Cartridge@@TN04Y When I output my code, the following structure occurs. Please note at this point, the OEM values are grouped, and each model within the dark borders on the left, has to have ALL of the values on the right side within these borders. Output array(1) { ["Brother"]=> array(2) { [1]=> array(1) { ["HL-4200 Series"]=> array(4) { ["TN12BK"]=> array(0) { } ["TN12C"]=> array(0) { } ["TN12M"]=> array(0) { } ["TN12Y"]=> array(0) { } } } [2]=> array(2) { ["HL-2700CN"]=> array(0) { } [" MFC-9420CN"]=> array(4) { ["TN04BK"]=> array(0) { } ["TN04C"]=> array(0) { } ["TN04M"]=> array(0) { } ["TN04Y "]=> array(0) { } } } } } Any takers as to why HL-2700CN and MFC-9420CN (or any sections like this) do not ALL get assigned the respective grouped OEMs? Additional information: The format of the end result needs to look like: Brother HL-4200 Series TN12BK TN12C TN12M TN12Y HL-2700CN TN04BK TN04C TN04M TN04Y MFC-9420CN TN04BK TN04C TN04M TN04Y Thanks
  14. $liked = explode(":", $_POST[submit]); if($liked[0] == "like"){ //Select from database where id is $liked[1] } <input type="image" src="images/arrowup.gif" name="submit" value="like:<? echo $right->id; ?>"/> Ok, so i have made a forum and i have a like function running on the comments of a post. I needed to find a way when the image was clicked it updated the database. So i experimented and came up with the solution above having it explode the value of the button to read if it was press and get the id. It works perfectly but i just want to be convinced it is safe.
  15. I have the following xml file called -> test.xml <?xml version="1.0"?> <OrderCollection xmlns:xsd="http://www.org/2009/XMLSchema" xmlns:xsi="http://www.w3.org/2009/XMLSchema-instance"> <Orders> <Order Id="130" Model=" Optimized" CampaignName="Promo" OrderName="1074" CreationDate="2013-05-29T16:30:03.41" StartDate="2013-06-03T04:00:00" EndDate="2014-04-22T03:59:59.997" OrderStatus="Active"> <Client Id="5" ExternalId="5" Name="CNL" /> <Lines> <Line Id="699" Status="Canceled" EstimatedReach="0" Desired="1000" Actual="370" MaxViewings="0" Separation="0"> <Line Id="700" Status="Canceled" EstimatedReach="10830" Desired="1000" Actual="0" MaxViewings="0" Separation="0"> <Line Id="701" Status="Canceled" EstimatedReach="0" Desired="1000" Actual="0" MaxViewings="0" Separation="0"> <Line Id="714" Status="Canceled" EstimatedReach="10830" Desired="1000" Actual="1478410" MaxViewings="0" Separation="0"> <Line Id="908" Status="Active" EstimatedReach="0" Desired="1000" Actual="1520" MaxViewings="0" Separation="0"> <Line Id="916" Status="Canceled" EstimatedReach="0" Desired="1000" Actuals="5260" MaxViewings="0" Separation="0"> </Lines> </Order> </Orders> </OrderCollection> For each <Line> node with a entry that has a status attribute of (Status="Active") I need to list The corresponding ID number. So from the XML above I need to pull out only Line Id="908", since it is the only one with a Status equal to Active. I have so far wrote this PHP code to attempt to accomplish this task. <?php $url = 'test.xml'; $xml = simplexml_load_file($url); foreach ($xml->xpath("//Line/@Status") as $t) { echo $t . PHP_EOL; } ?> The above code will print out all the "Status" attribute values properly from each xml LINE node, but I do not know how to put in a check on the xpath command to see if the @Status is set to active and then echo out, only the corresponding Id attribute (i.e 908 in this case) Any help would be greatly appreciated. Thanks,
  16. if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $result = mysqli_query($con,"SELECT * FROM Request"); echo "<table border='1'> <tr> <th>First Name</th> <th>Last Name</th> <th>Prayer Request</th> <th>Deactivate Request</th> </tr>"; while($row = mysqli_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['Reg_F_Name'] . "</td>"; echo "<td>" . $row['Reg_L_Name'] . "</td>"; echo "<td>" . $row['Reg_Request'] . "</td>"; echo "<td><input name=\"checkbox[]\" type=\"checkbox\" id=\"checkbox[]\" value=\"".$rows['Reg_ID']. "\" /></td>"; echo "</tr>"; } echo "</table>"; echo "<form action='' method='post'> <input type='submit' name='use_button' value='Update' /> </form>"; if(isset($_POST['use_button'])) { echo "Updated"; $update_id = $_POST['checkbox']; foreach($update_id as $value){ $sql = "Update Request set Reg_Status=0 WHERE Reg_ID='".$value."'"; $result = mysql_query($sql); } } mysqli_close($con); ?> the database is not updated when i click update.
  17. Hello, i have a question about how to change from database a row wich contains the duration of videos. I have videos with time in table row duration like this here below: Table: Duration 5:00 300 this should be like this > 3:00 < min 10:00 2000 this should be like this > 20:00 < 20 min 10000 this should be like this > 1:00:00 < 1 hour and so on. But when i echo out it show me like in the table row exactly. here is an exmple of my scrip: <?php $thumbs = $runrows ['thumbs']; $title = $runrows ['title']; $url = $runrows ['url']; $duration = $runrows ['duration']; while($runrows = mysql_fetch_assoc($getquery)) { echo '<li class="thumbcontent"><a href="'. $runrows['url'] .'" ><img src="'. $runrows['thumbs'].'" class="thumb" name="'. $runrows['title'] .'" alt="'. $runrows['title'] .'" title="'. $runrows['title'] .'" width="240" height="180" /> </a> <span class="duration">'. $runrows['duration'].'</span></li> '; } echo "<center>"; ?> And this is what a friend send me to check out but i cant figure out how to fit this code with my own code. <?php foreach (array(500, 234, 1100, 520, 1300, 10000) as $number) { echo $number, "\t"; $number = str_pad($number, 6, 0, STR_PAD_LEFT); echo ltrim($number{0}.$number{1}.':'.$number{2}.$number{3}.':'.$number{4}.$number{5}, ":0"), "\n"; } or this: foreach (['500', '234', '1100', '520', '1300', '10000'] as $number) { $time = strrev($number); $time = wordwrap($time, 2, ':', true); $time = strrev($time); echo "$number was transformed to $time\n"; } I hope i explained it well, i hope somebody can help me with a solution. Thanks in advance.
  18. Hi guys, I was wondering, is it possible to split an array into pages with 10 values on each page? And how can I make a navigation bar with Page 1 2 3 in it? And if it's possible, how would I do that? Thanks in advance, iRoot121
  19. Hi, I working on a html table and want to get row wise information of that. please check the attachment. this is my code <?php //if(isset($_POST['submit'])) // { include ("db.php"); $query_for_result=mysql_query("SELECT * FROM pro_production ORDER BY production_id"); $num=mysql_numrows($query_for_result); //echo <<<end //<table align="right" > //<tr> //<td bgcolor="#6f0d00" style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; padding:3px 5px 3px 5px; color:#FFFFFF;" >Total Result Search</td><td> </td><td bgcolor="#000000" style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; padding:3px 5px 3px 5px; color:#FFFFFF;">$num</td> //</tr> //</table> //end; mysql_close(); ?> <div id="main" style="width: 100%; float:left; border:solid #CCCCCC; background-color:#FFFFFF; overflow:scroll; height:500px;"> <table width="1800" align="center" border="1" cellspacing="0" cellpadding="0" style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; color:#000000; border:solid #d6d4d5; border-width:1px; margin-top:0px;"> <tr> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >S.No.</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >Booking Date</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >Delivery Date</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >Order Number</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >Customer Name</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >Status</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >Product Range</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >Cover</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >Size</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >Accessory</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >Bag</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >Packing</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >Delivery</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >Paper</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >Coating</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >Priority</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >Advance</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >G Total</td> <td valign="top" style="font-size:11px; background:#87bb2f; font-weight:bold;" align="center" >Balance</td> </tr> <?php $i=0; while ($i < $num) { $f1=mysql_result($query_for_result,$i,"production_id"); $f2=mysql_result($query_for_result,$i,"booking_date"); $f3=mysql_result($query_for_result,$i,"delivery_date"); $f4=mysql_result($query_for_result,$i,"order_no"); $f5=mysql_result($query_for_result,$i,"salutation"); $f6=mysql_result($query_for_result,$i,"customer_name"); $f7=mysql_result($query_for_result,$i,"status"); $f8=mysql_result($query_for_result,$i,"product_range"); $f9=mysql_result($query_for_result,$i,"cover"); $f10=mysql_result($query_for_result,$i,"size"); $f11=mysql_result($query_for_result,$i,"accessory"); $f12=mysql_result($query_for_result,$i,"bag"); $f13=mysql_result($query_for_result,$i,"packing"); $f14=mysql_result($query_for_result,$i,"delivery"); $f15=mysql_result($query_for_result,$i,"coating"); $f16=mysql_result($query_for_result,$i,"priority"); $f17=mysql_result($query_for_result,$i,"advance"); $f18=mysql_result($query_for_result,$i,"gtotal"); $f19=mysql_result($query_for_result,$i,"balance"); $f20=$f5.$f6; $f21=mysql_result($query_for_result,$i,"paper"); $id=$i+1; ?> <!--<tr onclick="myFunction(this)">--> <tr > <!--<td valign="top" style="font-size:11px; " align="center" ><?php echo htmlentities($f1); ?></td>--> <td valign="top" style="font-size:11px; " align="center" ><?php echo $id; ?></td> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f2; ?></td> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f3; ?></td> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f4; ?></td> <!--<td valign="top" style="font-size:11px; " align="center" ><?php echo $f5; ?></td>--> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f20; ?></td> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f7; ?></td> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f8; ?></td> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f9; ?></td> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f10; ?></td> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f11; ?></td> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f12; ?></td> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f13; ?></td> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f14; ?></td> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f21; ?></td> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f15; ?></td> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f16; ?></td> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f17; ?></td> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f18; ?></td> <td valign="top" style="font-size:11px; " align="center" ><?php echo $f19; ?></td> </tr> <?php $i++; } ?> </table> </div> What i want that if i select row first and the click on any of the bottom buttons then i could get the whole information of that row. I have done lot of search but i only able to get the data when click on the row itself but not when i clicked on the bottom button, So if any one can help me in this regard then i will be very thankful. thanks
  20. I tried to follow this tutorial (http://www.kshabazz.net/build-php-on-windows.html) to build php source code on windows many times but when i do "nmake test" appears an error message: "PHP crashes when GC invoked on COM object" I tried with different versions of php (5.5 and 5.6) and windows x86 and x64 but the errors are the same. I searched to find some information about the error and a open the file (/ext/com_dotnet/tests/bug49192.phpt) and then i saw the possibile solution for the problem, with an installer that fix the bug on windows 7. But the error still appear. That folder contains some bug files. In the next step, when i do "nmake snap" shows a error message too and every times that i execute this command appears that the "msvcr110.dll" is missing so a fix that but the still not working. Anyone know this problems?
  21. Hi, Who can make this work (return $rate), and make me very happy!? define('FINANCIAL_MAX_ITERATIONS', 128); define('FINANCIAL_PRECISION', 1.0e-08); function RATE($nper, $pmt, $pv, $fv = 0.0, $type = 0, $guess = 0.1) { $rate = $guess; if (abs($rate) < FINANCIAL_PRECISION) { $y = $pv * (1 + $nper * $rate) + $pmt * (1 + $rate * $type) * $nper + $fv; } else { $f = exp($nper * log(1 + $rate)); $y = $pv * $f + $pmt * (1 / $rate + $type) * ($f - 1) + $fv; } $y0 = $pv + $pmt * $nper + $fv; $y1 = $pv * $f + $pmt * (1 / $rate + $type) * ($f - 1) + $fv; // find root by secant method $i = $x0 = 0.0; $x1 = $rate; while ((abs($y0 - $y1) > FINANCIAL_PRECISION) && ($i < FINANCIAL_MAX_ITERATIONS)) { $rate = ($y1 * $x0 - $y0 * $x1) / ($y1 - $y0); $x0 = $x1; $x1 = $rate; if (abs($rate) < FINANCIAL_PRECISION) { $y = $pv * (1 + $nper * $rate) + $pmt * (1 + $rate * $type) * $nper + $fv; } else { $f = exp($nper * log(1 + $rate)); $y = $pv * $f + $pmt * (1 / $rate + $type) * ($f - 1) + $fv; } $y0 = $y1; $y1 = $y; ++$i; } return $rate; } // function RATE() Could be with following values: $nper=120 $pmt=1009.06 $pv=100,000 This is originally from StackOverflow . Thanks a million.
  22. I have tried everything I can think of with passthru and imagecreatefrompng and whatnot. I cant copy the file to a web directory, so that is out. I just have to be able to display the image. So, my php script calls a program that creates an image based on user input: $file_name = "/site.com/public/www/prod/data/" . $var1 . "_" . $var2 . "_" . $var3 . PHP_EOL; $image_name = $file_name . "_pic.png"; So the program saves the image, say... /site.com/public/www/prod/data/12_24_36_pic.png And yeah, I can totally see the image there. It looks great. However, The site's web root directory is this: /site.com/public/www/prod/htdocs/ So the image is sitting in a directory above what the browser can see. How can I display that image to people?
  23. This is my current layout Log Table userid int(11) email int(11) zoneid int(11) cash int(11) status int(11) creatime datetime <?php $Result = mysql_query("SELECT * FROM login WHERE name='$name' and email='$email'"); $count=mysql_num_rows($Result); if($count==1) { $row2 = mysql_fetch_array( $Result ); $ID = $row2['ID']; $TIME = $row2['creatime']; MySQL_Query("INSERT INTO log (id, zoneid, cash, status, creatime) VALUES ('$ID', '1', '100', '1', '$TIME')"); $_SESSION['name'] = $row2[name]; $_SESSION['email'] = $row2[email]; header("location:success.php?sys=success"); ?> I'm running a Voting system for a game, When each user Votes for their account, they will receive some rewards. But before the script completes, I want it to store the Email enterd into a seperate document or table, which automates deletion after X hours. So that when they try to run it again using the same Email before X hours is over, it will decline. Example; Users must login to Vote. <form name="form" method="post" target="_blank" action="vote.php?sys=vote"> <input type="text" name="name" value="<?php echo htmlentities($_SESSION['user']['0'], ENT_QUOTES, 'UTF-8'); ?>"><br> <input type="text" name="email" value="Email"> <input type="submit" name="Submit" value="Vote"> This is how I want the process to go.. <?php $name='John Doe', $email='JohnDoe@test.com' Insert $email into $DocumentorTable if $email already exists in $DocumentorTable > Error Try again later. if $email doesnt exist in $DocumentorTable > successful if successful > MySQL_Query("INSERT INTO log (id, zoneid, cash, status, creatime) VALUES ('$ID', '1', '100', '1', '$TIME')"); header("location:success.php?sys=success"); ?> I'm not very good with PHP as of yet, so I'm not entirely sure on how to finish the layout to a working standard.. Any help is very appreciated. However, if this is a process that is difficult or complex, maybe there's a way I can do this with the logged in session? Like, update the users session when they have voted with a mark, then after X hours the mark will automatically delete putting the session back to normal allowing them to vote again. But if the mark still stands, the voting will not commence. Thank you in advance!!
  24. need php,ajax auto scroll pagination for the website www.unitedwebsoft.in .Current site is in PHP and also some section in Drupa CMS.
  25. Hi folks, I have this coding problem that I want to pass the PHP variable $row[HEADMARK] and $row[iD] to another page to process update to the oracle DB as user check the checkbox. So on the data.php I have, <html> <head> $('.cuttingCheckbox').change(function() { if (this.checked) { $.post('process_data.php', { headmark : $($row[HEADMARK]).val(), headmark_id : $($row[ID]).val()}, function(response){ this.setAttribute("disabled", true), alert(headmark,headmark_id); }); } }); </script> </head> <?php // IF SHOW KEY HAS BEEN PRESSED if($_POST['action'] == 'show') { $sql = "SELECT * FROM SUB_MASTER_DRAWING WHERE SUB_MASTER_DRAWING.HEAD_MARK = '{$_POST["hm"]}'"; $query = oci_parse($conn, $sql); $query_exec = oci_execute($query); while($row = oci_fetch_assoc($query)){ echo "<table border='1'>"; echo '<table cellspacing = "0"'; echo '<thead>'; echo '<tr><th>Head Mark</th> <th>Cutting</th> </tr></thead>'; echo "<tbody>"; echo "<tr><td><b>$row[HEAD_MARK]/$row[ID]</b></td>"; if ($row['CUTTING'] == 'Y'){ echo "<td><input type='checkbox' id='cuttingCheckbox' name='cuttingCheckbox' checked='checked' disabled='disabled'/></td>"; } else { echo "<td><input type='checkbox' class='cuttingCheckbox' name='cuttingCheckbox' data-labelauty='Cutting done|Cutting NOT done'/></td>"; } echo "</tr>"; echo "</tbody>"; echo "<table cellspacing = '0'"; } echo "</table>"; }//===> END OF 'SHOW' ?> </html> And on the process_data.php should update the variables to the database <?php $cuttingUpdateParse = oci_parse($conn,"UPDATE SUB_MASTER_DRAWING SET CUTTING = 'Y' WHERE HEADMARK = '$_POST[headmark]' AND ID = '$_POST[ID]]'"); $cuttingUpdateRes = oci_execute($cuttingUpdateParse); if ($cuttingUpdateRes){ echo "<script>alert('CUTTING UPDATED');</script>"; } else { echo "<script>alert('ERROR OCCURED');</script>"; } ?> Somehow I couldnot get this code to work. even the alert on the jquery. please help me guys Million thanks
×
×
  • 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.