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


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

Found 974 results

  1. I have included a SVG-file into the html-page with the embed-tag, like this: index.html <!DOCTYPE html><html><head> <script type="text/javascript" src="jquery-1.7.1.js"/> function AJAX(){ $.post("UpdatePage.php",function (PhpParameter){ $("#SVGfile").html(PhpParameter); });} </head> <body> <div style="height:50px;width:50px;background-color:black;" onclick="AJAX()"/> <embed src="SVGimage.svg" type="image/svg+xml" /></body></html> The SVG-file looks like this: SVGimage.svg <?xml version="1.0" standalone="no"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"> <script type="text/ecmascript" xlink:href="Library.js"/> </svg> The Library.js -file contains a nessicary library to zoom and pan my SVGimage.svg document. Library.js uses the XML-DOM. I use jQuery's POST method together with a PHP-file, which retrieve data from the database and parse it back to the html-file. The problem is:I have stored information in a MySQL database telling what the SVG-picture should look like. How can I transfer this information into the embedded SVG-file? Unfortunatly, I can't used <svg> tags directly in the HTML-file, because the Library.js file is written for the XML-DOM. I didn't write it, and I'm not good enough to convert it into using the HTML-DOM. Any help is very welcome! This has turned out to be a huge headache.
  2. I created a script on a php page. The script is activated when user clicks the submit button on a form. I want to write functions on the same php page. How do I do this? MyData.php<?function getData(){$fname = _POST['fname']; $lname = _POST['lname']; //statements that tells it to write the information to file} function showData(){$price = _POST['price']; $qty = _POST['qty']; $total = $price * $qty; echo $total;}?> MyOutputPage.php<html><head><title>Sample Page</title></head><body>//I want to call the showData() function on the MyData.php page.//How do I do this? <form action=" " method="post"><input type="submit" value="Submit"/></form></body></html> Once I do this, how do I call individual functions on the page. Is there a way to add it to my page with the html like you do when linking to an external javascript script? Thank You
  3. Hi, I am just finalizing my first website and need a little advice on creating a form to complete a sale. I want to get customers name address email etc and then link to paypal to finalise payment. What is the best way to do this? I can create the form easily enough but am not too sure about getting the customers details sent to me via email etc. Advice please????? CheersCammy
  4. hi there, i need a little help with my regex.its been a while since i did this and forgot how to do something quite simple.i want to look for a section of the string that starts in a specific way, has something random in the middle, and ends in a secific way. so for example if i was looking for the the bit that starts 4 and ends 6 in 123456789 i would want to get back 456. the bit in the middle can be any characters and any lenght.i thought i could look for "start"+[.]+"end" but this dfoesnt seem to work. wherethe start is <div class="content">the end is </div> my code so far is below: this ones works if i hard code what im looking for ['stuff to replace']: $pattern = '/\<div class\=\"content\"\>stuff to replace\<\/div\>/';$replacement = '<div class=\"content\">this has been updated</div>';$updatedData = preg_replace($pattern, $replacement, $theFileData);the problem is when i start to look for 'anything' between the start and end:$pattern = '/\<div class\=\"content\"\>+[.]+\<\/div\>/';$replacement = '<div class=\"content\">this has been updated</div>';$updatedData = preg_replace($pattern, $replacement, $theFileData); please help.
  5. Mudsaf

    Php Text Show As ?

    So im having this problem with my php, when i get data from my SQL database example of this.gw-32?(f-bb>>&-p9yI@-)bSlj-wVyIW-(it will show it at website like this -load gw-32?(f-bb>>&-p9yI@-)bSlj-wVyIW-( So when it adds it goes like . Text is echoed to table. SQL type = TEXT. This is my charset on the page: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> Please any fix/help would be nice .
  6. How do I get php to put the contents, and only the contents, of a file being uploaded into an array?
  7. I developped a simple html/php/mysql website. I would like to run it on my customer's server and I don't want to reveal my source code, so I am looking for a way to hide or encrypt it. I came across ionCube and other commercial solutions, but I need something cheaper (free) and less complex. And I also came across "eval gzinflate str_rot13 base64_decode", but it can be decoded easily, because it doesn't use a "secret key". My question is, how can I encrypt my html/php files with a key file that is placed on my own server. So if I remove it, the software on my customer's server' will not work anymore. Is there anything like that? Thanks.
  8. Hello internet. I have been looking around and I'm not sure I have found the method to use to complete this task. Here it is:- I want the user to send three numerical guesses to my database (this is no problem)- I will submit my own three numbers that will be the actual numbers the user will be trying to guess (this is no problem)- I want to send all those rows through a check function and then assign a value for each row based on how well they did guessing the number (this is where I am having an issue)- I would then like to echo back to the user all the guess totals - along with the names - in a table (this will not be a problem) I think I can handle all of this except how to write the function and send all the rows in mysql through that function and then assign a "total" value for each row based on how well then did guessing. Your help is appreciated.
  9. I am working on a website for my work but they will not give me a webserver. So basically I have to run it off a fileshare. This limits me to HTML, Javascript, and CSS formats to get anything done. I need to be able to accept data entered into a form and store it somewhere so it can later be queried for analysis in another website type format. Any suggestions? Somethings to keep in mind also so you know what I'm working with here. - older dell workstations running XP- IE7 is the only browser we are able to use on the work machines- No web server access or ability to pull in data from outside resources since the machines do not have internet access.
  10. Hello internet. I have been sending my site out to people to test out and mess around with and some feedback I am getting is that they are having pop-up blocker issues and even when they temporarily turn the pop-up blockers off they still do not get my echo's that I really need them to get. So - how do I send the echo right to the same webpage that the form is on?
  11. wernerz

    Suggestions

    I would like to create an interactive form that customers may choose their orders via drop down list/image rollover then are able to view the selected product/image in the adjacent div. After the customer selects which items they would like, they hit the email/submit button to send the product details to the company for the order, and also to have the e-mail formatted in plain text. Help would be appreciated by your suggestions on the best way to go about this from the "back-end" perspective. Would it be better to use javascript and php or do you think a flash form with javascript. Time is not a concern on this project.
  12. Hello Friends I have to visit a website which offers you Free Videos on various topics.Some Links I am posting here.AJAXhttp://learnerstv.com/Free-Computers-Video-lectures-ltv322-Page1.htmFundamentals of PHPhttp://learnerstv.com/Free-Computers-Video-lectures-ltv166-Page1.htmBasics of PHPhttp://learnerstv.com/Free-Computers-Video-lectures-ltv427-Page1.htm Regards,Er. Sumit Machra[+91-9414475695][http://brahmansh.in]
  13. Hey all! I'm running a script that downloads a file from a site. The client facing url looks something like this http://media.site.com/83jdks9dj?id=1 when I put that url into the web browser it gets resolved to a large url that actually then stream/downloads the media. I'm using wget to download then place the file into a directory on my site. But the issue is that wget needs the resolved url not the url that you see in the code. Is there any way in php to store the resolved url in a var? in theory something like this $src = 'http://media.site.com/83jdks9dj?id=1'; //unresolved url $srcResolved = resolve_url($src); thanks!
  14. I have this contact form and really ned help with my php file. What would i need in my SendContact.php file in order for this form to work?? Thanks <div id="left"><div id="contact_form"><font size="+2"><b>Contact us?</b></font><p><font size="-2">Please use the form below to send us a message.</p></font><form method="post" onsubmit="return sendContact();" action="sendContact.php"><p><label for="name" id="lname">Full name:</label><input type="text" class="text" name="name" id="name" onfocus="input_focus('name');" onblur="input_blur('name');" /></p> <p><label for="email" id="lemail">Email address:</label><input type="text" class="text" name="email" id="email" onfocus="input_focus('email');" onblur="input_blur('email');" /></p><div class="x"></div><p class="error" id="email-error">You must enter your email address.</p> <p><label for="category" id="lcategory">Category:</label><select name="category" id="category" onfocus="input_focus('category');" onblur="input_blur('category');"><option value="software">Website Related</option><option value="hardwae">Content Related</option><option value="consulting">Complaint Related</option></select></p> <p><label for="message" id="lmessage">Message:</label><textarea name="message" id="message" onfocus="input_focus('message');" onblur="input_blur('message');"></textarea></p><div class="x"></div> <div class="x"></div> <input type="submit" class="submit" name="send_contact" value="Send" /> </form> </div> <div id="message_sent" style="display:none;"><h1>Your message has been sent</h1><p>We'll contact you in a shortest possible time.</p><p>You can now <a href="index.html" class="read-more">go back</a> to home page.</p></div> </div> </body></html>
  15. AskSMBR

    Xampp Mysql

    Asalam-o-aliqum or Hello I am facing problem when connect MySQL database in XAMPP localhost if you know the answer plz replay Thanks. I have write "Asalam-o-aliqum" which Muslims says when meet someone. instead of hello.
  16. My php contact form wont send the emails to my account?This is my contact from page<table width="400" border="0" align="center" cellpadding="3" cellspacing="1"><tr><td><h2><strong>Contact Form </strong></h2></td></tr></table><table width="400" border="0" align="center" cellpadding="0" cellspacing="1"><tr><td><form name="form1" method="post" action="send_contact.php"><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td width="16%">Subject</td><td width="2%">:</td><td width="82%"><input name="subject" type="text" id="subject" size="50"></td></tr><tr><td>Detail</td><td>:</td><td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td></tr><tr><td>Name</td><td>:</td><td><input name="name" type="text" id="name" size="50"></td></tr><tr><td>Email</td><td>:</td><td><input name="customer_mail" type="text" id="customer_mail" size="50"></td></tr><tr><td> </td><td> </td><td><input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="Reset"></td></tr></table></form></td></tr></table><p> </p></form>This is my php code for the contact form<?php// Contact subject$subject ="$subject"; // Details$message="$detail";// Mail of sender$mail_from="$customer_mail"; // From $header="from: $name <$mail_from>";// Enter your email address$to ='gareth.joynt@go.edgehill.ac.uk';$send_contact=mail($to,$subject,$messa…// Check, if message sent to your email // display message "We've recived your information"if($send_contact){echo "We've recived your contact information";}else {echo "ERROR";}?>Please help thanks
  17. Hello internet - what I am trying to do is that I have two different regular buttons (preview and submit) and I also have two functions I named checkit and checkit2 - but now I would like checkit to post different information than checkit2 when the forms are sent to m m_post_process_4.php to be processed. How do I accomplish this? My form text is:<form name=tourney action="m m_post_process_4.php" method="post" target="_blank">My button text is:<input type="button" name="Preview" value="Preview"; onclick="checkit();" /><input type="button" name="Submit" value="Submit"; onclick="checkit2();" />
  18. programAngel

    Simplexml

    if I have the following xml:<?xml version="1.0" encoding="utf-8" ?><NewDataSet> <office> <room /> </office> <office> <room></room> </office> </NewDataSet>if I am using simplexml to parse the file, how can I differentiate between the first case and the second?
  19. Hello internet. I would like to start off by saying that W3Schools forum and all you great programmers that respond to these topics is INVALUABLE!!! Thank you so much. Here is my problem... I currently have only one form for my site<form name=tourney action="m m_post_process_4.php" method="post" onSubmit="return checkit()" target="_blank"> When all the requirements have been met (through the checkit function) the form is sent to the PHP file for processing. However, I have two submit buttons and would like each button to process a different function - one for checkit and one for checkit2. This may seem odd because you may say combine the two functions into one function but the problem I am running into is that I cannot seem to get the element ID during a submit action. If I could I would combine the two functions and run comparisons to do all the work. However, the PHP output keeps telling me "Undefined1" for the ID value I am trying to compare. Any thoughts?
  20. Hi guys. I am glad I found this community because I desperately need some help. I am new at PHP so please bare with my ignorance I run a loop for my member section of my site that contains a form login at login.html, checklogin.php and forhandlerservice.php (the actual membersite)The form takes username and password and when the user submits the information it is send to a file called checklogin.php. In here the username and password is checked against my database.If the username and password is correct the user is redirected to forhandlerservice.php, otherwise the user is told that the username or password is wrong.This all works fine. What I want to do is to greet the user after he logs in. The greeting should be something like: Hello John (where the name changes depending on the login of course).As of now, using the code I have, I can only figure out how to register the username and password in my session, which then only allows me to print out one of these two variables.So my question is this:How do I register the remaining content in my database (I currently have: ID, username, password, realname); where the greeting should be associated with the realname.The code I am using now works fine but is limited to only printing out either the username or password. It looks like this:<?phpecho "Velkommen " . $myusername;?> I have attached the code for checklogin.php and the first lines of my forhandlerservice.php (the rest is just the basic site containing a lot of html) I really hope it makes sense as I desperately need this done.Thanks for your time and help Best,CyRus2273 checklogin.php firstlines.rtf
  21. Fmdpa

    Crazy Php/xml Problem

    I am absolutely stumped on this problem. I've been trying to solve it for hours and hours. The problem is that whenever I perform the following code, instead of appending this once like it should: <rating> <value>(1-5)</value> <ip>127.0.0.1</ip> <id>id</id></rating> It appends it 21 times! Every time! I even switched my code to using SimpleXML instead of DOMDocument and it still did it! When I dump the XML code onto the page, it only shows it appended once. I am thoroughly confused. Anyway, here's SermonRatings.php: <?phprequire_once 'global.php';class SermonRating { public function add($rating, $sermon) { $domDoc = new DOMDocument(); $domDoc->formatOutput = true; $doc = $domDoc->load('sermon_ratings.xml'); $root = $domDoc->getElementsByTagName('ratings')->item(0); $rating_node = $domDoc->createElement('rating'); $value = $domDoc->createElement('value'); $value->appendChild($domDoc->createTextNode($rating)); $ip = $domDoc->createElement('ip'); $ip->appendChild($domDoc->createTextNode($_SERVER['REMOTE_ADDR'])); $sermon_id = $domDoc->createElement('id'); $sermon_id->appendChild($domDoc->createTextNode(xmlentities($sermon))); // xmlentities() defined in global.php; it is not the problem because this was happening before I added the function $rating_node->appendChild($value); $rating_node->appendChild($ip); $rating_node->appendChild($sermon_id); $root->appendChild($rating_node); $saved = $domDoc->save('sermon_ratings.xml'); return $saved; } // ...other unrelated methods...} $sr = new SermonRating;echo $sr->add(1, 'sermon.wma'); And here's sermon_ratings.xml: <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE ratings [ <!ELEMENT ratings (rating*)> <!ELEMENT rating (value , ip , id)> <!ELEMENT value (#PCDATA)> <!ELEMENT ip (#PCDATA)> <!ELEMENT id (#PCDATA)>]><ratings> </ratings> After I visit sermonRatings.php and those last two lines of code trigger the method execution and the file is modified and saved, there are 21 child <rating> elements in the file. I'm totally confused.
  22. I have many buttons (not radio or checkbox but just simple buttons) on my page where the values were populated by an "onclick" command. How do I get PHP to process all that data and list it out.
  23. birbal

    Php Gtk2 Installation

    I am trying to install php-gtk2 in my local server whihc run on xampp. reading from their website it seems php-gtk run beside with php. It dont run with php. Will it create any trouble to run and work with both from the same server? I have not any prior experiance with gtk so i am not sure how will it work. I can experiment with installation but from this moment i dont want to affect php installation which i am already runing. Any advice regarding this and regarding gtk will be appriciated!thanks!
  24. Is it possible to embed a word document into a html? I have web server host locally like http://localhost, I was able to embed .pdf but not knowing how to embed word document. I've try iframe but instead of showing on the web browser, it prompts the web surfer to save or open and that's not the solution I was look for. Can someone point me to the right information? thank you..
  25. So I am at the part of my website where I need to decide how to display individual products being sold on the website. I want to display the picture, a description, and link it to a paypal account where the individual product can be sold. But I am unsure how to do it. I could do it with HTML easily, but I am wondering if I should use PHP or another programming langauge so I dont have to create 1 page per product, so I dont have to create 50 additional pages. Im thinking that I would have to create a template page using HTML or PHP and then use the programming language to fill in the description and images according to which link (product) they click. How would I do this exactly? I dont have a ton of experience with PHP, am I way over my head? And would PHP would well with PayPal? again, would that be a huge project?
×
×
  • Create New...