Jump to content

Search the Community

Showing results for tags 'Php'.

The search index is currently processing. Current results may not be complete.
  • 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








  1. Hi everyone, I'm trying to create to select the name of table, then pick column in PHP, I succeed pick table, then put name table in variable, then put this variable to end of SQL syntax, then pick column name, then submit, but it went error by broke and violate of SQL syntax. Hey, It's not about SQL injection, this database is very useless. it's just practice. Can you help why it won't work? [php] $sqltable = "SHOW TABLES"; $querytable = $GaryDB->query($sqltable); while($row3 = $querytable->fetch()) { $table .= "<option value='$row3[0]'>" . $row3[0]
  2. Hello everyone, I'm trying to get abbreviate states from plain text into HTML select and option, seem it's not working. Can you help me? here my PHP code: /* Read file to insert as option in HTML */ $file = fopen("States.txt","r") or exit("Unable to read"); while(!feof($file)) { $states = fgets($file); $statelist = "<option value='".$states."'>".$states."</option>"; } fclose($file); Then <tr><td>State:</td><td><select id="abb" name="abb"><?php echo $statelist ?></select></td>
  3. Hello, please could you help me with this PHP script? It should recognize users web browser and according it should input correct condition. I make this because SAFARI and IE don't support function ' type:''date'' '. So can you give me an advice? CODE: <?php function detect() { if (\strpos($_SERVER['HTTP_USER_AGENT'], "MSIE", "Safari") === false){ echo 'Dátum zákroku / Date of procedure [YYYY-MM-DD]'; echo '<p><input class="w3-input w3-border" required name="datum_zakroku"></p>'; }else{
  4. Hello, please could you help me with my problem about PHP script? I need my program to detect user browser because html function 'type=''date'' ' is not supported by SAFARI and IE. Please help me with this. Thanks <?php function detect() { /*$info = $_SERVER['HTTP_USER_AGENT'];*/ /* @var $_SERVER type */ echo $_SERVER['HTTP_USER_AGENT']; $browser = get_browser(); print_r($browser); if (\strpos($browser, 'IE') === true){ echo 'Dátum zákroku / Date of procedure [YYYY-MM-DD]
  5. I want to know how I would go about making a script where a user would type in a message and post that said message. Is sql required?
  6. Hi All, I've seen that in PHP you can include a require or include function which saves you from having to add the entire code for headers and footers for each page. Does a similar things exist in HTML? If so, please direct me. Thanks in advance Russell
  7. I have used the W3 template to produce a script that uploads image changes to a directory on my server, updates the URL in my database and logs the event. Works beautifully IF the source folder is: \Pictures or \Pictures\Personal But fails if it is any other source folder, even the peer folder \Pictures\BarImages Why?
  8. https://www.w3schools.com/php/phptryit.asp?filename=tryphp_filter_adv3 is a tutorial example. It attempts to validate what appears to be a valid URL but claims it is not. I see this forum gets little use, so has the language changed since the example was created, is there a mistake in the example, or is the problem on my end in the browser? I am using the latest FireFox browser under Windows 10.
  9. 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.
  10. 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.
  11. 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
  12. 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.
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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.
  18. 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
  19. 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
  20. 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!
  21. 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
  22. 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,
  23. 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...
  24. 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
  25. 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
  • Create New...