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

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

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


Languages

  1. In PHP 5, I conventionally opened my pages with <?php but within the pages I often used <? to open a php block, e.g., <?echo $variable; ?>. In PHP 7, I find it is necessary to always use <?php and follow it with a space, e.g., <?php echo $variable; ?> I haven't been able to find any reference to this syntax change so my question: Is this a new requirement of PHP 7? Can it be turned off? Otherwise, I will need to edit all of the sites where my earlier habit was used, which I think I can do but would feel compelled to spend some hours testing afterward.
  2. Qazi

    Toggle Switch

    Hello everyone I am doing an IOT project in which is am successfull to send my microcontroller data to MySQL. I am receiving data in 0 and 1. Now what i want to do? I just to create a toggle switch that will ON when data in database is 1 and when data is 0 it remains OFF. secondly when i click the switch it should OFF in case it is already ON and a data 0 should be sended to database. same in case of OFF to ON. Please help me You can also use Javascript.
  3. I have changed the code, because it happens to me before with another code. The thing is my code is aparently ok but when you fill the form and send it the e-mail is not sent. Any idea, please? Thank you. I Attach the code and the html page. My web site is http://victorpan.com/contacto.html contacto.php correo.php
  4. Hello everyone I want Show Some Recorded according financial year For Example from 01-04-2016 to 31-3-2017 01-04-2017 to 31-03-2018 my Code $pst = date('Y'); $pt = date('Y', strtotime('+1 year')); $sql="SELECT *FROM mytable where date BETWEEN CAST('$pst-04-01' AS DATE) AND CAST('$pt-03-31' AS DATE)"; Anyone Can explain how i done this
  5. At Ingolme's suggestion, I've switched from simpleXML to DOMXML for this because I need to be able to replace a node. I've done my best to follow PHP.com examples, and everything seems to work up until the point of the actual replacement. I hope you can spot what's keeping it from working. The vars found in the heredoc are assigned earlier from the customer input form. if $found is positive, it contains a cId (customer ID) that exists in the DB and should be updated with any new info (code shown). If negative, it's abs() is the cId for a new node to be added (code omitted here). In $xm
  6. So I wants to take value from URL, I create simple PHP code for taking value from URL <?php if(isset($_POST["Search"])){ $url = $_POST["url"]; $value = (explode ('v=', $url)); $videoId = $value[1]; } ?> This for taking value from this https://www.youtube.com/watch?v=value url and echo somewhere, but wants to take value from https://www.youtu.be/value , this also, but how? , work with both URLs
  7. Hi all, l'm a Newbie here I would like to create a page, which after user logged in, they was able to update number of chanting daily with number input. User may insert number and click submit button to update its. After updated, below the submit button, to show up the total number of their total chanting number, and total of all users chanting numbers. Lastly is the history of users update in table view which showing username, date of update, number of updates. Can I have the solution or any related article or site which i can referring to... Thanks all.
  8. I have a problem with an XML file that has the following structure: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <DATAPACKET Version="2.0"> <METADATA><FIELDS> <FIELD attrname="Id" fieldtype="i4" readonly="true" SUBTYPE="Autoinc"/> <FIELD attrname="Blocco" fieldtype="string" WIDTH="5"/> <FIELD attrname="Domanda" fieldtype="string" WIDTH="2"/> <FIELD attrname="Risposta" fieldtype="boolean"/> <FIELD attrname="Capitolo" fieldtype="string" WIDTH="2"/> <FIELD attrname="Indice" fieldtype="string" WIDTH="3"/> <FIEL
  9. I have changed the code, because it happens to me before with another code. The thing is my code is aparently ok but when you fill the form and send it the e-mail is not sent. Any idea, please? Thank you. I Attach the code and the html page. My web site is http://victorpan.com/contacto.html contacto.html correo.php
  10. I have a php code for a form but I don't know how to use it I started reading about php but still don't understand it. So when I use the code on the hosting my nav says the form is already sent so i had to stop using it. What should i do to receive e-mails from my form on my website. The fact is I even don't know if i put the code on the right place. Thank you very much!!!!! My website is http://www.victorpan.com/ I also attach the file with the code I want to use as a coment inside the code.contacto.php
  11. Question 24: The if statement is used to execute some code only if a specified condition is true Says the right answer is True. Not correct, you can also do if statements to check if something is not true with ! mark.
  12. Hello. I am currently editing my register.php file, which creates the user's account, but also at the same time makes a new file - their profile page. Here is the function: // Create profile page. $handle = fopen($username.".php", 'w'); $pageContent = ""; function createProfile() { fwrite($handle, $pageContent); } createProfile(); This function works, but not when I put this code inside -> https://pastebin.com/9j3rR12v. I have tried to swap all of the " for ' but it doesn't work. What happens is the register.php page does not load at all. I
  13. I have this little program: <!DOCTYPE html> <html> <body> <?php echo "why can not I explode array like 0->1, 1->2, 2->3 ..".'<br>'; ?> </body> </html> The output: why can not I explode array like 0->1, 1->2, 2->3 ..input script var total = [1,2,3,4,5];what I got with \ document.write(total) \ :1,2,3,4,5exploded array var_dump: array(1) { [0]=> string(40) "1,2,3,4,5" } so why does not explode the string in an array? This says it all!
  14. This is a weird request, been battling with the idea and the how, hoping for some help. I have a list of keys which need to sent out to each visitor who enters a site. the keys are currently on an Excel sheet, the keys must move sequentially down the list (Not repeat the above key) I thought of doing this with a form (like a gravity form) the problem is they dont allow you to read of the entries sequentially and show it on the screen that doesnt really work. happy to have the codes as an array, just the method of passing it out. if anyone knows of the code which can help me,
  15. I am able to retrieve data from a js like this: <!DOCTYPE html> <html> <body> <script> var a=[1,2,3,4] </script> <?php $ap= "<script> document.write(a) </script>"; print_r ($ap); $b=explode(',',$ap); print_r($b); ?> </body> </html> Result: 1,2,3,4Array ( [0] => 1,2,3,4 ) Why is the array not explode
  16. hello all, i stored the data in db in field page_desc. echo the field data works fine. <?php echo stripslashes($pageDetails["page_desc"]); but i want to change the color and font of each line of data which is retrieved from page_desc. how to do this..help me...
  17. I'm working on a Contact Form for my website. It works, except the "Phone" field doesn't show a phone number in the sent message. It's just blank where the number should be displayed. What am I doing wrong? - Thanks HTML: <div class="contact-form"> <h2 class="style">Contact Us</h2> <form action="contact.php" method="post" id="form"> <div> <span><label>NAME</label></span> <span><input name="cf_name" type="text" class="textbox"></span> &l
  18. hi , in the python requests POST tutorial in the site , there is this piece of code , url = 'https://ipaddress of my server .../myphp.php' myjson = {'somekey': 'somevalue'} x = requests.post(url, json = myjson) it sends the json data to a php file in a server that i have access to how can I access json data in myphp.php file in the server ??? thanks
  19. Tarun

    PHP

    i have created one php file and html file and connected to each other. But here i want a help reqards to php. Details mentioned below: This is my HTML file: <form method="post" action="contact.php"> <textarea name="message"></textarea> <input type="submit"> </form> This is my PHP file: <?php if($_POST["message"]) { mail("your@email.address", "Form to email message", $_POST["message"], "From: an@email.address"); } ?> Here i want to know is if i want to add another textarea say it as name in HTML, so can
  20. Hello everyone, i have created a html form and a button. Javascript reacts to the button click sends the html values to functions.php and there i have a function to insert into the wordpress database. Every field is working and is being inserted into the database but i have some problems to upload and save a image file with these steps. Iam not using a html form i wanted to go the javascript way. Is there any option/solution to insert an image file as blob into mysql using php without form submit just via javascript ajax ? Thanks and best regards,
  21. Hello! I need to know how to create a sitemap, which updates automatically according to web posts. Our company website is https://www.albacars.ae/ , a used car dealer in UAE, we post cars everyday, and it should be updated automatically on sitemap. Instead of doing this manual, is there any way to do? Thank you!
  22. Hi I have a query that returns the count of entries based on CURDATE(), it works for any dat in this month (April) but does not work for next month (May). I think it is something to do with CURDATE()+3 returns 2018-04-31 which should be 2018-05-01 This Works as Date is in April SELECT COUNT(Machine) FROM production WHERE Status = 'Confirmed' AND DATE(FROM_UNIXTIME(production.Required)) = CURDATE() This does not work as in May SELECT COUNT(Machine) FROM production WHERE Status = 'Confirmed' AND DATE(FROM_UNIXTIME(production.Required)) = CURDATE()+3
  23. Hello All, I'm trying to create a table of images in which each image would be a different link to a product on our website. I'm just learning how to code so I appreciate any help you can give! Attached is pdf showing the general layout of what I'm trying to do. Thanks! Line Card 10-16-18.pdf
  24. iwato

    Undefined Variable

    GREETING: Happy New Year, W3Schools! I am looking forward to another year of online progress. Hopefully many of the problems that I have been experiencing for the last year and a half will disappear with the addition of a brand new iMac that can handle the latest PHP and MySql software. This said, I remain the advanced novice that I am and very much hope that you will continue to stand by my side. BACKGROUND: Please find below a set of code that permits one new set of functionality, but destroys another. The related error messages are provided beneath the code. if (isset($_GET[
  25. Dear all, In my project, I am using an emebedded webserver LIGHTTPD with PHP. Within the main webpage, I use slider to write its value within a local file on my Linux OS. I wrote the slider like this: <input type="range" name="lightInputName" id="lightInputId" value="1" min="1" max="20" onchange="getvalor(this.value);" oninput="lightOutputId.value = lightInputId.value"> <input size="1" type="text" name="lightOutputName" id="lightOutputId"></input> What I want to do is to know if a javascript and/or PHP script is able to read the value of the slider, and cop
×
×
  • Create New...