Jump to content

Search the Community

Showing results for tags 'html 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

Found 5 results

  1. I have a page that contains a List box containing a list of categories taken from a mysql database, 4 iframe elements and 4 submit button (code to follow) When an item is selected from the List box the onchange event submits the page to jobs.php and loads it into the joblist iframe. Once the iframe is loaded and visible it makes the "Add Job To Category" submit button visible. This all works great When I click the "Add Job To Category" Submit button it loads Jobnew.php into the jobed iframe this is working but I can not seem to figure out how to pass the selected item from the List box using this submit button I hope I am clear in my question if not please advise any help is very much appreciated.... Jobtask.php <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Job Configuration</title> <head> </head> <body> <div style="position:absolute;left:5px;top:0px;width:1345px;height:50px;z-index:0;"> <img src="images/img0001.png" id="Shape1" alt="" style="border-width:0;width:1345px;height:50px;"></div> <span style='position:fixed;left:525px;top:8px;font-family:Arial;font-size:32px;width:275px;'>Job Configuration</span> <form action='index.html' target='' method='post'> <div style="position:absolute;left:205px;top:55px;width:1345px;height:50px;z-index:0;"> <Input type="submit" action="index.html" Target="_top" method='post'Value="Main Menu"> </div> </form> <form style=position:fixed;left:200px;top:82px;> <iframe name='joblist' id='joblist' style=position:fixed;left:200px;top:px;visibility:hidden;z-index:10 src='' height="475" width="1150" scrolling='yes' frameBorder='0' ></iframe> <iframe name='job' id='job' style=absolute:fixed;left:200px;top:0px;visibility:hidden;z-index:0 src='' height="475" width="1150" scrolling='yes' frameBorder='0' ></iframe> <iframe name='jobed' id='jobed' style=position:fixed;left:460px;top:150px;visibility:hidden;z-index:10 src='' height="217" width="350" scrolling='no' frameBorder='0' ></iframe> <iframe name='newcat' id='newcat' style=position:fixed;left:460px;top:150px;visibility:hidden;z-index:10 src='' height="125" width="350" scrolling='no' frameBorder='0' ></iframe> </form> <?php error_reporting(E_ALL); include('dbcon/dbconnect.php'); $con=mysqli_connect($host,$user,$password,$db); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } if (isset($_POST['id'])) { $insql= "INSERT INTO catagory (Catagory) VALUES ('$_REQUEST[newcat]')"; $con->query($insql); } $Catresult = mysqli_query($con, "SELECT CatID, Catagory FROM catagory"); echo "<div id='wb_CatSel' style='position:absolute;z-index:0;text-align:center;'bgcolor='#00b0e6';>"; echo "<span style='position:fixed;left:10px;top:82px;font-family:Arial;font-size:15px;background-color:#00b0e6;width:175px;'>Select Category</span></div>"; echo "<form action='jobs.php' target='joblist' style='position:fixed;left:10px;top:101px;'></td>"; echo "<select name='cat' size='11' style='width: 175px;' onchange='this.form.submit()'>"; while($row = mysqli_fetch_array($Catresult)) { echo "<option value=\"".$row['CatID']."\">".$row['Catagory']."</option>\n "; } echo "</select>"; echo "</form>"; echo "<form action='Jobnew.php' target='jobed' method='post'>"; echo "<div style='position:absolute;left:10px;top:285px;width:1345px;height:50px;z-index:0;'>"; echo "<Input type='hidden' id='id1'><Input type='submit' id='sbtn' style='width:175px;visibility:hidden;' Value='Add Job To Category'></div></form>"; echo "<form action='Jobtask.php' target='' method='post'>"; echo "<div style='position:absolute;left:10px;top:310px;width:1345px;height:50px;z-index:0;'>"; echo "<Input type='submit' style='width:175px;' action='Jobtask.php' Target='_top' method='post' Value='Reset Form'></div></form>"; echo "<form action='newcat.php' target='newcat' method='post'>"; echo "<div style='position:absolute;left:10px;top:335px;width:1345px;height:50px;z-index:0;''>"; echo "<Input type='submit' style='width:175px;'' action='newcat.php' Target='newcat' method='post' Value='Add New Category'></div></form>"; ?> </body> </html>
  2. Hello all, I am trying to call two functions onclick of a submit button. the two functions inturn go to two php scripts..i want the php scripts to be run one after the other. But, its not working. Please take a look at my code and suggest some changes my html : <form method="post" action="" name="form"> <label> New Data set: </label> <input type="radio" name="url" value="NetOptInput2.html" id="ex1" required/> Yes <input type="radio" name="url" value="NetOptResult2.html" id="ex2" required/> No <br><br><br> <label>Dataset description: </label> <input type="text" name="dataset" id="field1" size="30" placeholder="" readonly><br><br><br> <label>Token Number : </label><input type="text" name="token" id="field2" size="6" placeholder="" readonly><br><br><br> <div style="text-align: center"><br> <input type="Submit" name="submit" value="Submit" class="submit" onclick="return(OnButton2() && OnButton1())"> <div class="spacer"></div> </form> My Javascript <!-- this function navigates user according to the radio button selection--> <script language="Javascript"> function OnButton1() { document.form.action = "Input1a.php" // document.form.target = "_blank"; // Open in a new window //document.form.submit(); // Submit the page // return true; } function OnButton2() { document.form.action = "Input1b.php" //document.form.target="_blank"; // document.form.submit(); // Submit the page // return true; } <!--This function disables the Token Number form if the user clicks "yes" radio button and disables Dataset if "No"--> <script type="text/javascript"> $(function(){ $("#ex1, #ex2").change(function(){ $("#field1, #field2").val("").attr("readonly",true); if($("#ex1").is(":checked")){ $("#field1").removeAttr("readonly"); $("#field1").focus(); } else if($("#ex2").is(":checked")){ $("#field2").removeAttr("readonly"); $("#field2").focus(); } }); }); MY php file1 if (isset($_POST) && $_POST['url1'] == "Yes") { header('Location: NetOptInput2.html'); } else if (isset($_POST) && $_POST['url2'] == "No") { header('Location: NetOptResult2.html'); } my php file 2 if (isset($_POST['submit'])) { $dataset = $_POST['dataset']; $tokennumber = $_POST['tokennumber']; $data = "$dataset | $tokennumber\n"; $file = "input.txt"; $fp = fopen($file, "w") or die("Couldn't open $file for writing!"); fwrite($fp, $data) or die("Couldn't write values to file!"); fclose($fp); $message = "Saved to $file successfully!"; }
  3. hi guys, i am new here and looking for help on build a form and php code to send to mysql database's table with multiple rows inserted and AUTO Increment id. here what i have tried, but i gues im not good at php coding: <body> <form name="input_primary" action="test5.php" method="post"> <font color="#000000"><strong>Customer Name</strong></font><input name="cust_name" type="text" /> <table width="100%" border="1px solid black" id="maintab"> <tr> <th scope="col">JOB ID</th> <th scope="col">Make/Model</th> <th scope="col">Serial/IMEI</th> <th scope="col">Faulty</th> <th scope="col">Reapir</th> <th scope="col">Accessory</th> <th scope="col">Condi</th> <th scope="col">Intern Note</th> <th scope="col">Status</th> <th scope="col">Date Add</th> </tr> <?php //Repeat element inside loop 5 times for($i=0;$i<5;$i++) { ?> <tr> <td> <input name="job_id[]" type="hidden" /> </td> <td> <input name="makemodel[]" type="text" size="20px" /> </td> <td> <input name="serial[]" type="text" size="20px" /> </td> <td> <input name="faulty[]" type="text" /> </td> <td> <input name="repair[]" type="text" /> </td> <td> <input name="accessory[]" type="text" size="20px" /> </td> <td> <input name="conditions[]" type="text" size="30px" /> </td> <td> <input name="intern_note[]" type="text" /> </td> <td> <input name="status[]" type="text" size="20px" /> </td> </tr> <?php } ?> </table> <input type="submit" value="Save results!" name="submit" /> </form> </body> and here is my PHP <?php include "storescripts/connect_to_mysql.php"; if (isset($_POST["job_id"])) $job= $_POST["job_id"]; if (isset($_POST["makemodel"])) $model = $_POST["makemodel"]; if (isset($_POST["serial"])) $serial = $_POST["serial"]; if (isset($_POST["faulty"])) $faulty = $_POST["faulty"]; if (isset($_POST["repair"])) $repair = $_POST["repair"]; if (isset($_POST["accessory"])) $accessory = $_POST["accessory"]; if (isset($_POST["conditions"])) $conditions = $_POST["conditions"]; if (isset($_POST["intern_note"])) $intern_note = $_POST["intern_note"]; if (isset($_POST["status"])) $status = $_POST["status"]; //$url = $_POST["url_target"]; $sql = "INSERT INTO Repair(`job_id`,`makemodel`,`serial`,`faulty`,`repair`,`accessory`,`conditions`,`intern_note`,`status`,`date_added`) VALUES('job','$model','$serial','$faulty','$repair','$accessory','$conditions','$intern_note','$status', now())"; ?> When i submit the button, nothing heppen, no errors and no data create in my mysql table at all. can anyone help me with this? thanks in advanced Stephen
  4. i have an edit link in registration field. i want when the user clicks on the edit link the edit page must open in which city field must retrieve the database value as well as the rest of the dropdown value in the form of dropdownlist....as well as the corresponding location field must be autopopulated...
  5. I bought a template online which has a pop-up quick contact form on each page.Please help me construct a php form to make it work.I'm new to PHP Please help me!! This html form is given below. 1) Could someone please help me remove the "website" fieldset and add "Tel" for telephone number(optional) in that field instead?? 2).Please help me contruct a php form to make the HTML contact form below work. <form> <fieldset><input name="Name" type="text" value="Name:" onfocus="if(this.value=='Name:')this.value='';" onblur= "if(this.value=='')this.value='Name:';"/></fieldset> <fieldset><input name="Mail" type="text" value="E-Mail:" onfocus="if(this.value=='E-Mail:')this.value='';" onblur= "if(this.value=='')this.value='E-Mail:';"/></fieldset> <fieldset><input name="Web" type="text" value="Web:" onfocus="if(this.value=='Web:')this.value='';" onblur= "if(this.value=='')this.value='Web:';"/></fieldset> <fieldset><textarea name="Message" onfocus="if(this.value=='Message:')this.value='';" onblur= "if(this.value=='')this.value='Message:';">Message:</textarea></fieldset> <fieldset><input type="submit" value="Send" /></fieldset> </form>
×
×
  • 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.