Jump to content

Search the Community

Showing results for tags 'PHP'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 974 results

  1. hey friends, I have a problem with this, what happpenned with its Notice: Undefined index:, I use XAMP 17.7 , berfore I use XAMP1.7.1 the notice never appear , wht is wrong pls , help me thks mastah ..
  2. damju87

    PHP Loops

    How do I set this kind of loop? First, it fills the cell with the data from the database. <table border="1"><tr><td>Row 1, cell 1</td></tr></table> Then, if there is more data added into the database. <table border="1"><tr><td>Row 1, cell 1</td><td>Row 1, cell 2</td></tr></table> Here's where I want the loop to start. I want it to repeat the process when the row has two cells by creating a new row.
  3. Good day, I am quite new to web design with only 3 weeks experience and I ran into a problem that totally elude me. I am currently working on my website and I am stuck with my "Send" button. I can't apply the style from my CSS to my php button, it is supposed to be on the right side and look like the clear button, instead I get a plain rectangle box on the left side. [/left] The first part of the following code is to make a clear button. Here is the html part of the code:[/left] [/size][/color][/font][/left]<div class="alignright"><a href="#" class="link4" onClick="document.getElementById('contacts-form').reset()"><span><span>Effacer</span></span></a><span><span><input type="submit" class="link2" value="Envoyer" id="submit-button"/></span></span>[font="Arial, Helvetica, sans-serif"][color="#555555"][size=3] And here is the CSS code for both buttons, one in HTML and the other in php: [/size][/font][/color][/left][/size][/font][/color][/left].link2 {display:inline-block;color:#fff;font-size:15px;line-height:1.2em;text-decoration:none;background:url(http://gatesinnovation.com/GATES/Images/link2-bgd.gif) left top repeat-x;letter-spacing:-1px;text-transform:uppercase}.link2:hover {color:#336633}.link2 span {display:block;background:url(http://gatesinnovation.com/GATES/Images/link2-left.gif) no-repeat left top}.link2 span span {background:url(http://gatesinnovation.com/GATES/Images/link2-right.gif) no-repeat right top;padding:10px 22px}] .link4 {display:inline-block;color:#fff;font-size:15px;line-height:1.2em;text-decoration:none;background:url(http://gatesinnovation.com/GATES/Images/link4-bgd.gif) left top repeat-x;letter-spacing:-1px;text-transform:uppercase}.link4:hover {color:#336633}.link4 span {display:block;background:url(http://gatesinnovation.com/GATES/Images/link4-left.gif) no-repeat left top}.link4 span span {background:url(http://gatesinnovation.com/GATES/Images/link4-right.gif) no-repeat right top;padding:10px 22px} I am pretty sure that what is causing it is the missing in the php part, but I am unsure how to insert it in this code.If you need more info to be able to solve this I will gladly provide you with the information you request,here is the website dev link to see it in context: Contact pageThank you for your time.[/left]
  4. I've kind taught myself PHP whilst looking online for examples. I use classes, I just wonder if I'm setting up my classes the right way. Do you have to explicity give a class access to another class in the way I've done below?: $db = new dbConnectionMSSQL();$systemLog = new systemLog();$clubTickets = new clubTickets();$Customers = new Customers();$Events = new Events();$TicketOrders = new TicketOrders();$PlacesOfInterest = new PlacesOfInterest();$Tonight = new Tonight(); $clubTickets->db = $db;$clubTickets->Customers = $Customers;$clubTickets->Events = $Events;$clubTickets->PlacesOfInterest = $PlacesOfInterest;$clubTickets->TicketOrders = $TicketOrders;$clubTickets->Tonight = $Tonight; That's what I've been doing up until now. Is there a more efficient way to do it? Every time I create a new class, I need to copy the bold coce above for that class. Or is that just life in PHP?
  5. hello,I need help in my academic project. I need to transfer some data from one php script on one machine to that on another. I am using curl for that. I can use CURLOPT_POSTFIELDS for that but it does not transfer the control to second script. I want to use CURLOPT_FOLLOWLOCATION but how to use it i dont know. So please help me out with some code.this is what i tried.curl.php
  6. I'm trying to save a lot of time instead of editing the page everytime. Wouldn't it be easier to just change the information in the database, right? I've been searching for days on how to do it but having no luck. I will be very grateful for the help. Thank you. <table id="data"> <tr> <th scope="row">Occupation</th> <td>Singer</td> </tr> <tr> <th scope="row">Debut</th> <td>December 02, 2011</td> </tr> <tr> <th scope="row">Data of Birth</th> <td>February 13, 1990</td> </tr> <tr> <th scope="row">Record Label</th> <td>Ttakttaguri Entertainment</td> </tr> <tr> <th scope="row">Links</th> <td><a href="http://d2kr.com/hboard3/" target="_blank">Official</a>, <a href="http://blog.naver.com/agia0213">Naver Blog</a>, <a href="https://twitter.com/#!/agia0213">Twitter</a>, <a href="http://me2day.net/agia0213" target="_blank">Me2day</a></td> </tr></table>
  7. hello everyone, I've been working on a script that reads records out of database each record is a small array of questions(basically a survey system), per record a total score is assigned(this is the Javascript part) //echo the question list from the database$query_questions = mysql_query("SELECT * FROM `vraag`");while($result = mysql_fetch_array($query_questions)){//displaying the questionsecho "<br /><br /><b>";echo $result['header']. "</b><br />";echo $result['beschrijving']. "<br /><br />";echo $result['onderwerp']. "<br />"; //sneaky rogue values!$aantal = $result['aantal_vragen'];//this is a troublesome part of code as well I'll elaborate on this further down the postecho "<input type='hidden' id='number_of_questions' value=".$aantal." mousedown='calculate_score(this.value,0)'/>";$array = unserialize($result['vraag']);//the question list is stored in an array which I'll read out later//retrieve the content from the array foreach($array as $value){//below I created five radio elements because I want people to give each question a score from 1 to 5 I //used the form tag so that each each row of radio boxes would behave properlyecho "<form><table><td>". $value."</td>";echo "<td>1<input type='radio' name='vraag[]' value=1 onclick='calculate_score(".$aantal.",this.value)'/></td><td>2<input type='radio' name='vraag[]' value=2 onclick='calculate_score(".$aantal.",this.value)'/></td><td>3<input type='radio' name='vraag[]' value=3 onclick='calculate_score(".$aantal.",this.value)'/></td><td>4<input type='radio' name='vraag[]' value=4 onclick='calculate_score(".$aantal.",this.value)'/></td><td>5<input type='radio' name='vraag[]' value=5 onclick='calculate_score(".$aantal.",this.value)'/></td></table></form>";}}echo "Uw totaal score is: <span id='total_score' name='span[]'></span>";echo "<br /><form action='submit_survey.php' method='POST'><input type='hidden' name='total' value='total_score.value' />Naam : <input type='text' name='naam_opleider' /><br />bedrijf: <input type='text' name='bedrijf' /><br />Straat: <input type='text' name='straat' /><br />Postcode, Plaats: <input type='text' name='postcode' /><br /><input type='submit' value='versturen' /></form>"; what goes wrong is that it uses the last record of the query as the value to calculate with, it ignores the first record and the second and only picks up the last(third) record I want it to assign a score per record so shortly drawn out[record 1]score [record 2]score [record 3]score currently it works like this[record 1] [record 2] [record 3]score So shortly how do I fix this? I don't think the javascript is essential to the problem but if necessary I can include it :)edit note: There are no syntax errors purely functional I removed a for loop that wasn't really doing anythingthanks in advance
  8. hello w3schools... was wondering... im searching for the momment being for good and relieable sources to start up a reseller company... and the only 2 sources i find nice is ->opencart (newest version...)->BoxBilling (newest version...)... so here is my problem/question... does anyone in here knows how i can integrate boxbilling billing system into opencart?... because opencart is a shop and not recommended for hosting bills and such stuff... but boxbilling is... but i also like to sell stuff (one time)... and there opencart comes in handy and not boxbilling... so anyone... knows how to integrate the boxbilling system into the opencart?... and yeah... its a bigger project... i know... because boxbilling are running all billings automaticly... so it will be alot of ###### of coding... but still... have been looking alot and have made my mind clear... the only thing is that im needing a little help to do the first step ... so... hoping answers soon ... BUMP: Dont know if this is the right section... but also kinda discuss-able thread... so... discuss... .
  9. Hello W3S... i have a little trouble here witch im in a need of little help with...im for the momment being trying to make a new portfolio design... the only problem im standing with right now is the box im making... (VIEW AT PICTURE IVE ADDED BELOW...) well... what im trying to do is to make a (latest News) box... but note that i said (box)... all the elements/modifications im making on my portfolio should be places into a nice designed box...that would look alot pretty... the only problem is that i dont know how to make these boxes... orr... yeah... i can, but it would take hours/days... since im not the best when its comming to the box-making css/html part... and besides that, i also need help to code the news box so (as seemed in the picture added...),so people can see (date added,they can drop the table down with a java-klappe,ect...) but the most important part is to code/design the box...so if you could give me some sort of tutorial how to add... then i would be so freaking happy! ... thanks dudes... hoping someone can help me out. .Hoping answers soon... Regards: rootKID EDIT: If you did not understand what i just said... then leave a comment and i will (try) my best to make a new and more explained/detailed stuff of the problem i have... thanks..
  10. Hello everyone, Lets share the best books you know related to web development. Share their links as well so that they can easily be downloaded should be in PDF formate. Thanks.
  11. Err

    What's wrong with this?

    function dbErr($num,$n) { switch ($num) { case 1044: case 1045: $err = err("Access to \"{$n}\" denied using current DB User and/or DB Pass."); break; case 1049: $err = err("The database \"{$n}\" does not exist."); break; case 2002: $err = err("There is no such DB Host. Check spelling."); break; default: $err = err("There is a problem connecting to the database. ".mysql_errno().": ".mysql_error()); } return $err; } function dbConnect($h,$u,$p,$n) { if (!$con = @mysql_connect($h,$u,$p)) {$err = dbErr(mysql_errno(),$n);} else if (!@mysql_select_db($n,$con)) {$err = dbErr(mysql_errno(),$n);} return (isset($err)) ? $err : ""; } I got told my code was wrong so I come here hoping people can prove there is a fault in my code. I suspect that people are simply not understanding some PHP syntax. If you can find anything wrong with this, let me know. Edit: I should note that the code works fine, but since I was told by several people it was wrong, I'm out to be proved wrong.
  12. Mudsaf

    [PHP, SQL Question]

    Im wondering is it possible to make 2x connections in 1 page whitout getting error from other connection. (Whitout disabling errors on PHP.ini also.) My code so far this. <?php$local = mysql_connect('localhost', 'root', 'PASSWORD);if (!$local) {} else {mysql_select_db("DATABASE"); }$server = mysql_connect("HOSTSERVER", "USER", "PASS");if (!$server) {} else {mysql_select_db("DATABASE");}?> So my point is i want to create php that first tries to connect localhost, if it gets error and cannot connect it tries to connect to "HOSTSERVER". (Whitout getting errors on "Localhost" connection.)
  13. I would like to offer to the visitors of my website the possibility for them to enter their email address in order to receive sometime a newsletter from my website.How to code the input form to get their email address?How to code the procedure to check the good validity of the email?How to code the storage in MySQL?How to code the procedure of sending an email to confirm the subscription and also to propose a link to unsubscribe?How to code to retrieve the email stored in the database when wishing to send a newsletter?And then, how to code the sending of this newsletter? I am ok with HTML/XHTML & CSS but I need help regarding how to handle PHP, MySQL and other things necessary to do the above project. Can someone help me? Thanks.H Olivier Dauxais.
  14. Hello, I am rather beginnner. HTML/XHTML and CSS is fine for me but I still have problem with PHP.Can someone tell me how to do in PHP a common menu for many different HTML pages?Thanks.H Olivier Dauxais.
  15. <?php$dbh = new PDO('mysql:host=localhost;dbname=mydata', 'root', '**********'); $tLat = $_GET['tLat'];$tLng = $_GET['tLng']; foreach($dbh->query('select name, lat, lng from locations') as $row) { $main_arr[] = $row;} echo json_encode($main_arr); ?> So I have some code above which I am working on. I am thinking about what is the best way to handle this. I suppose I could develop a simple solution that just adds and subtracts from "$tLat" and "$tLng" and then use a "where" clause in the query but I am looking for a better way. I know that there are GIS functions built into MySQL that perhaps could be used. My goal is to find all rows where lat and lng are a specified radius from "tLat,tLng". ? Thanks! P.S. I have already existing code for PHP that implements Haversine's that I could use but that would require each row to be processed individually. Is there not a way to handle the distance calculation within the query directly?
  16. hello every buddy, i want to show my search engines top 10 recent searches in my siteplz see my search enginewww.topmse.com it is php based search enginei want to show its recent searches by users in my site for getting its result pages indexed on google.plz somebuddy help me.i can create a database but i was not able to create a working script for this programe that is why i posting here. it is urgent plz help me. plz help me
  17. Hi guys, i have a bit of a PHP problem and would appreciate a bit of help. I am currently doing a project in college and it involves PHP, which i am a bit dodgy on. Basically we have to create a HTML page, with a drop box menu showing 5 music albums, and a Submit button. Here is what i have to show up the Deopdown menu in HTML: [/color]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">[/color]<html> <head><title>Album List</title></head> <form action="chosen_album.php" method="post"> <select name="albums"><option value="1">Appetite For Destruction</option><option value="2">Out Of Exile</option><option value="3">West Ryder Pauper Lunatic Asylum</option><option value="4">One By One</option><option value="5">Master Of Puppets</option> <p><input type="submit" name="submit" value="Submi" </p></select></form> </body></html> Now, when you pick an album name and hit submit, it should bring you to a page showing all the album info, track list, etc. (I have all this info from a previous project). But where im stuck is for the PHP code needed to link the HTML drop box page. This is my PHP code so far, but doesnt seem to work properly. I am using a Wamp server for my loclahost which is up and running ok, so dont think thats the problem: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html> <head><title>Chosen Album</title></head> <?php$chosen_album = $_POST['albums'];$album_info = ''; if ($chosen_album== 1) {//appetite for destruction$album_info ='<p class="album_title">Appetite For Destruction</p><p class="artist">Artist: Guns N Roses</p><p class="track_list">Track List:</p><ol class="list"><li>Welcome to the jungle</li><li>Its so easy</li><li>Nightrain</li><li>Out ta get me</li><li>Mr Brownstone</li><li>Paradise city</li><li>My Michelle</li><li>Think about you</li><li>Sweet Child o mine</li><li>Youre crazy</li><li>Anything goes</li><li>Rocket queen</li> </ol> <iframe width="420" height="315" src="http://www.youtube.com/embed/i_gQOfF0Ymo" frameborder="0" ';}if($chosen_album==2) {//out of exile$album_info = '<p class="album_title">Out Of Exile</p><p class="artist">Artist: Audioslave</p><p class="track_list">Track List:</p><ol class="list"><li>Your Time Has Come</li><li>Out Of Exile</li><li>Be Yourself</li><li>Doesnt Remind Me</li><li>Drown Me Slowly</li><li>Heavens Dead</li><li>The Worm</li><li>Man Or Animal</li><li>Yesterday To Tomorrow</li><li>Dandelion</li><li>#1 Zero</li><li>The Curse</li><li>Like A Stone</li></ol><iframe width="420" height="315" src="http://www.youtube.com/embed/f_4MBuxMBN4" frameborder="0" allowfullscreen></iframe>';}if($chosen_album== 3) {//west ryder.......$album_info = '<p class="album_title">West Ryder Pauper Lunatic Asylum</p><p class="artist">Artist: Kasabian</p><p class="track_list">Track List:</p><ol class="list"><li>Underdog</li><li>Where Did All The Love Go?</li><li>Swarfiga</li><li>Fast Fuse</li><li>Take Aim</li><li>Thick As Thieves</li><li>West Ryder Silver Bullet</li><li>Vlad The Impaler</li><li>Ladies & Gentlemen (Roll The Dice)</li><li>Secret Alphabets</li><li>Fire</li><li>Happiness</li></ol><iframe width="560" height="315" src="http://www.youtube.com/embed/tjMnhiCUnr0" frameborder="0" allowfullscreen></iframe>';}?> (NOTE: I have only filled info for the first 3 items on the drop box to test it out)Basically, at the end i should have 1 HTML file (dropbox), 1 PHP file (album info) and 1 CSS file for styles (which im ok with.) Any help would be appreciated.
  18. HamelMesk

    Cake PHP

    Dear all, I hope seeing a tutorial for CakePHP, i found many tutorials but none of them has the wonderful learning method of W3schools.
  19. hey.. can anybody help me,.??.. I want make a program decision support system (DSS)using PHP with the method of Analytic Hierarchy Process (AHP) ,.. my have a problem how to put the AHP method to the PHP program.. pls help me
  20. Hi there, I have been looking up on how to use SOAP in relation to php and have managed to hit a bit of a snag with it. Basically on my server i get some information which is presented in xml format from sharepoint. I then wish to access this data from a php file on another server and print it out onto the screen. I have heard using a soap call is the best method for this. The problems i am having are as follows: Gaining authorisation to the xml file i which contains the soap contents i.e. how to log in with username and password Reading the soap content in php to capture some data and print it out Shown below is a copy of my data which is in an xml format: <xml><s:Schema id="RowsetSchema"><s:ElementType name="row" content="eltOnly" rs:CommandTimeout="30"><s:AttributeType name="ows_DocIcon" rs:name="Type" rs:number="1"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_LinkFilename" rs:name="Name" rs:number="2"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_Created" rs:name="Created" rs:number="3"><s:datatype dt:type="datetime" dt:maxLength="8"/></s:AttributeType><s:AttributeType name="ows_Author" rs:name="Created By" rs:number="4"><s:datatype dt:type="string" dt:lookup="true" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_CheckoutUser" rs:name="Checked Out To" rs:number="5"><s:datatype dt:type="string" dt:lookup="true" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows__x007b_064b332a_x002d_4d9e_x002d_4e7e_x002d_8cf9_x002d_227b6c7972db_x007d_" rs:name="Learner Name" rs:number="6"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_StartDate" rs:name="Start Date" rs:number="7"><s:datatype dt:type="datetime" dt:maxLength="8"/></s:AttributeType><s:AttributeType name="ows_JobTitle" rs:name="Job Title" rs:number="8"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_Region" rs:name="Region" rs:number="9"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType><s:AttributeType name="ows_Learner_x0020_Email" rs:name="Learner Email" rs:number="10"><s:datatype dt:type="string" dt:maxLength="512"/></s:AttributeType></s:ElementType></s:Schema><z:row ows_DocIcon="xml" ows_LinkFilename="learner_name.xml" ows_Created="2012-03-20 16:26:24" ows_Author="17;#**** *****" ows__x007b_064b332a_x002d_4d9e_x002d_4e7e_x002d_8cf9_x002d_227b6c7972db_x007d_="****** ******" ows_StartDate="2012-03-20 00:00:00" ows_JobTitle="Director" ows_Region="Durham" ows_Learner_x0020_Email="******@hotmail.co.uk"/></rs:data></xml> Ok so that is the code for one learner record which i am wanting to parse in php...all i want to know is, what do i do to get the learner e-mail address? (the one with the value xxxxx@hotmail.com from the page which requires authorisation to view it. So far i have tried the following with no luck (hashed out the main part of url as contains confidential material): <?php$xml = simplexml_load_file("http://*********.co.uk:8088/OPS/_vti_bin/owssvr.dll?Cmd=Display&List={6A2E72AB-8F77-4B94-A7FA-DB00527CEFB4}&XMLDATA=TRUE");echo $xml->AttributeType() . "<br />";foreach($xml->children() as $child){echo $child->AttributeType() . ": " . $child . "<br />";}?> I have also tried the following php code to display the learner name field (that is the name starting with ows__ with letters, underscores and numbers as shown below). it just says failed to load external entity which i am unsure about: <?php$client = new SoapClient("http://*********.co.uk:8088/OPS/_vti_bin/owssvr.dll?Cmd=Display&List={6A2E72AB-8F77-4B94-A7FA-DB00527CEFB4}&XMLDATA=TRUE", array(trace=>true, 'login'=>"*******", 'password'=>"*****"));$res = $client->row(array('ows__x007b_064b332a_x002d_4d9e_x002d_4e7e_x002d_8cf9_x002d_227b6c7972db_x007d_'=>5));print $res;?> As you can see i have hashed all of the confidential details out but if somebody could maybe correct my php code so that i can gain access to the file, parse an element from the xml and then display it on the screen then that would be great. Obviously i do have more records but only displayed the first one for demonstration purposes. I also have access to the request and response generated by the server if you wish to see them or maybe point me in the direction on how i can use them instead to print out the values in php. Many thanks, Mark
  21. I want to define http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js as $jquerylink in a variable, so that I can link them by just typing $jquerylink.
  22. Expectation of code: I would like it to take the number the customer selects and based on that number load a different page. So you load into index.php The options are 1 - 4. I am receiving the information into Variables. However, it's not changing the page. Here is the code for it to change the page. header('Location: driven' + $num + '.html');} Also is there a better way of breaking out of php code? <?phpif(isset($_POST['submit'])){echo "Submit button has been pressed"; ?><br /><?phpecho $num; ?><br /><?phpif ($num < 1){ $error="Invalid option"; echo $error;}else{ header('Location: driven' + $num + '.html');}}?> Notice all the <?php ?> ??
  23. Greetings, I am trying to write a small page where the user selects how many users. I want to use a drop down list. I believe I have everything in place. However, I can not get the submit information into my php script. Any thoughts? HTML / PHP code <?php$num=$_POST["num"];$errorif ($num < 1) $error="Invalid option";if ($num == 1) header('Location: driven1.html');if ($num == 2) header('Location: driven2.html');if ($num == 3) header('Location: driven3.html');else header('Location: driven4.html');?><!DOCTYPE HTML><html><head><link href="driven1.css" rel="stylesheet" type="text/css"/><title>Driven support request</title></head><body><?php echo $error ?><div class="body"><header class="header"><!--Accelera logo--><img src="AcceleraLogo.jpg" alt="Accelera Logo" /></header><div class="div1"><form method="get"> <fieldset class="user1"> <label>How many users?</label> <br /> <select name="num"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4+">4+</option> </select> <br /> <input type="submit" value="Submit" /> </fieldset></form></div></div></body></html>
  24. EDIT: i found out myself... just look away from this topic ..
  25. Good morning all. I am not new to website design/development but am new to this forum. I have an urgent matter which needs to be resolved by Friday 9th. I have a testimonial script which works fine. It takes data from a form inserts to a database and a second script displays the testimonials for users to see. My problem is it doesn't have a facility where by an administrator can approve testimonials, as a result I have had two scams which to remove you have to delete from the database it's self. May I have some suggestions on how to go about solving this problem? Kind regards Adam
  • Create New...