Search Results

Search found 3286 results on 132 pages for 'arthur br'.

Page 20/132 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • ecommerce - use server side code for hidden values in an html form

    - by bsarmi
    I'm trying to learn how to implement a donation form on a website using virtual merchant. The html code from their developer manual goes like this: <form action="https://www.myvirtualmerchant.com/VirtualMerchant/process.do" method="POST"> Your Total: $5.00 <br/> <input type="hidden" name="ssl_amount" value="5.00"> <br/> <input type="hidden" name="ssl_merchant_id" value="my_virtualmerchant_ID"> <input type="hidden" name="ssl_pin" value="my_PIN"> <input type="hidden" name="ssl_transaction_type" value="ccsale"> <input type="hidden" name="ssl_show_form" value="false"> Credit Card Number: <input type="text" name="ssl_card_number"> <br/> Expiration Date (MMYY): <input type="text" name="ssl_exp_date" size="4"> <br/> <br/> <input type="submit" value="Continue"> </form> I have that in an html file and it works fine, but they suggest that the merchant data (the input type="hidden" values) should be in a Server Side Code. I was looking at cURL but it'a all very new to me and I spent a couple of hours trying to find some guide or some sample code on how to accomplish that. Any suggestions or help is greatly appreciated. Thanks!

    Read the article

  • Not Inserted into database in PHP script

    - by Aruna
    Hi, i am having an form for uploading an excel file like <form enctype="multipart/form-data" action="http://localhost/joomla/Joomla_1.5.7/index.php?option=com_jumi&fileid=7" method="POST"> Please choose a file: <input name="file" type="file" id="file" /><br /> <input type="submit" value="Upload" /> </form> And in the FIle http://localhost/joomla/Joomla_1.5.7/index.php?option=com_jumi&fileid=7 i have retrived the uploaded file contents by <?php echo "Name". $_FILES['file']['name'] . "<br />"; echo "Type: " . $_FILES["file"]["type"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; echo "Stored in: " . $_FILES["file"]["tmp_name"] . "<br />"; $string = file_get_contents( $_FILES["file"]["tmp_name"] ); foreach ( explode( "\n", $string ) as $userString ) { $userString = trim( $userString ); echo $userString; $array = explode( ';', $userString ); $userdata = array ( 'cf_id'=>trim( $array[0] ), 'text_0'=>trim( $array[1] ), 'text_1'=>trim( $array[2] ), 'text_2'=>trim( $array[3] ), 'text_3'=>trim($array[4]), 'text_6'=>trim($array[5]), 'text_7'=>trim($array[6]), 'text_9'=>trim($array[7]), 'text_12'=>trim($array[8])); global $db; $db =& JFactory::getDBO(); $query = 'INSERT INTO #__chronoforms_UploadAuthor VALUES ("'.$userdata['cf_id'].'","'.$userdata['text_0'].'","'.$userdata['text_1'].'","'.$userdata['text_2'].'","'.$userdata['text_3'].'","'.$userdata['text_6'].'","'.$userdata['text_7'].'","'.$userdata['text_9'].'")'; $db->Execute($query); echo "<br>"; } i am trying to insert the contents into the table #__chronoforms_UploadAuthor in Joomla database . it doent shows any error but it is not inserted into the database.. Please help me.. Y the contents are not inserted into the database...And how to make it inserted into the database..

    Read the article

  • Jquery Block on my document .ready function not working

    - by kumar
    Hello Friens, I have this code, I added JS Script file to my Master page. <script src="/Scripts/Jquery.blockUI.js" type="text/javascript"></script> This Below code I have in my master page.on document.ready <script type="text/javascript"> $(document).ready(function () { $.blockUI({ message: $('#question'), css: { width: '275px'} }); }); </script> <div id="question" style="display:none; cursor: default"> <h2 class="padding"><br />An unexpected system error has occurred while processing your request.<br /></h2> <h3>We apologize for this inconvenience.<br /> Please report this error to your system administrator with the following information:<br /><br /> Session id is:</h3> <input type="button" id="OK" value="OK" /> </asp:Content> On my Document.ready Function my BlockUi is not working? can any body tell me why its not working? thanks

    Read the article

  • posting array of text fields using jquery and ajax

    - by tabia
    i dont want to use serialize() function please help me with this. I am a beginner html <input type='button' value='Add Tier Flavor' id='Add'> <input type='button' value='Remove Tier Flavor' id='Remove'> <div id='batch'> <div id="BatchDiv1"> <h4>Batch #1 :</h4> <label>Flavor<input class="textbox" type='text' id="fl1" name="fl[]" value=""/></label></br> <label>Filling<input class="textbox" type='text' id="fi1" name="fi[]" value="" /></label></br> <label>Frosting<input class="textbox" type='text' id="fr1" name="fr[]" value=""/></label></br> </div> </div> <br> </div> this is a dynamically added fields using javascript the code is: javascript <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ var counter = 2; $("#Add").click(function () { if(counter>5){ alert("Only 5 Tiers allow"); return false; } var newBatchBoxDiv = $(document.createElement('div')).attr("id", 'BatchDiv' + counter); newBatchBoxDiv.html('<h4>Batch #'+ counter + ' : </h4>' + '<label> Flavor<input type="text" name="fl[]" id="fl' + counter + '" value=""></label><br>'+ '<label> Filling<input type="text" name="fi[]" id="fi' + counter + '" value=""></label><br>'+ '<label> Frosting<input type="text" name="fr[]" id="fr' + counter + '" value=""></label><br>' ); newBatchBoxDiv.appendTo("#batch"); counter++; }); $("#Remove").click(function () { if(counter==1){ alert("No more tier to remove"); return false; } counter--; $("#BatchDiv" + counter).remove(); }); }); </script> i am trying to post the values in an array to post it onto next .php page i am using this var user_cupfl = $('input[name^="fl"]').serialize(); var user_cupfi = $('input[name^="fi"]').serialize(); var user_cupfr = $('input[name^="fr"]').serialize(); serialize is not passing the values. :( on second page i am trying to mail it using $message .= "<tr><td><strong>Cake Flavors(according to batches):</strong> </td><td><pre>" .implode("\n", $user_cupfl). "</pre></td></tr>"; $message .= "<tr><td><strong>Filling type (Inside the cake):</strong> </td><td><pre>" .implode("\n", $user_cupfi). "</pre></td></tr>"; $message .= "<tr><td><strong>Frosting type (top of the cake):</strong> </td><td><pre>" .implode("\n", $user_cupfr). "</pre></td></tr>"; i m posting array like this $user_cupfl=filter_var($_POST["userCupfl"], FILTER_SANITIZE_STRING); $user_cupfi=filter_var($_POST["userCupfi"], FILTER_SANITIZE_STRING); $user_cupfr=filter_var($_POST["userCupfr"], FILTER_SANITIZE_STRING); your replies will be highly appreciated

    Read the article

  • Jquery gradient behavior applies to all but first URL

    - by Dustin
    I've got a page that shows my photography portfolio. I'm trying to do a jquery gradient on the text, and it's working on all but the first link. Here's the html: <h1><a href="portfolio/engagements"><span></span>engagements</a> | </h1><br> <h1><a href="portfolio/weddings"><span></span>weddings</a> | </h1> <br> <h1><a href="portfolio/bridals"><span></span>bridals</a> | </h1> <br> <h1><a href="portfolio/families"><span></span>families</a> | </h1> <br> <h1><a href="portfolio/seniors"><span></span>seniors</a> </h1> <br> And here's the jquery call: $(".jquery h1").prepend("<span></span>"); And here's the css for it: .gradient4 span { background: url(images/gradient-dark.png) repeat-x; position: absolute; bottom: -0.1em; display: inline; width: 100%; height: 29px; } The problem I'm having is that all urls but the first link (currently 'engagements'), have the gradient effect. Any ideas why the first link isn't working?

    Read the article

  • how can i edit the action of the buttons in the dialog box in jquery?

    - by noob
    this code is from the demo of modal confirmation from jquery's site. <script type="text/javascript"> $(function() { $("#dialog").dialog({ bgiframe: true, resizable: false, height:140, modal: true, overlay: { backgroundColor: '#000', opacity: 0.5 }, buttons: { 'Yes': function() { $(this).dialog('close'); }, 'No': function() { $(this).dialog('close'); } } }); }); </script> <div class="demo"> <div id="dialog" title="Empty the recycle bin?"> <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>These items will be permanently deleted and cannot be recovered. Are you sure?</p> </div> <!-- Sample page content to illustrate the layering of the dialog --> <div class="hiddenInViewSource" style="padding:20px;"> <p>Sed vel diam id libero <a href="http://example.com">rutrum convallis</a>. Donec aliquet leo vel magna. Phasellus rhoncus faucibus ante. Etiam bibendum, enim faucibus aliquet rhoncus, arcu felis ultricies neque, sit amet auctor elit eros a lectus.</p> <form> <input value="text input" /><br /> <input type="checkbox" />checkbox<br /> <input type="radio" />radio<br /> <select> <option>select</option> </select><br /><br /> <textarea>textarea</textarea><br /> </form> </div><!-- End sample page content --> </div><!-- End demo --> <div class="demo-description"> <p>Confirm an action that may be destructive or important. Set the <code>modal</code> option to true, and specify primary and secondary user actions with the <code>buttons</code> option.</p> </div><!-- End demo-description --> can anyone tell me how to edit the action for the buttons? when yes is clicked i want to be redirected to test.php and when i hit no i want to be redirected to another page.

    Read the article

  • How to strip everything between a key phrase and an ending tag?

    - by user3620142
    I am trying to strip everything between a key phrase and ending tag but for some reason it is not working. I always get blank data. I've tried many different ways but no luck. Basically I have a script that connect to IMAP and store emails into MySQL as service tickets. It works great but I am trying to strip off everything except for user reply because currently if a user reply to an email it re-inserts the entire email into MySQL. I added a key phrase at the top of all outgoing emails . Structure is as below: --Reply below this line to respond-- ------------------------------------------------------------------------------------ Email body message... When replying to the message, it becomes: New Message reply...... --Reply below this line to respond-- old message body. I would only like to insert the new reply message only. This is what I've got so far: $message = strip_tags($message, "<br><div><p><u><hr></section>"); $message=preg_replace("</p>", "br /", $message); $message=preg_replace('#--REPLY above this line to respond--(.*?)</section>)#s', ' ', $message); $message=clean("<br/><hr><u>Received On $rep_date / $from_email</u><br><br/>$message"); It inserts the Received On date and From but $message is blank. If I remove $message=preg_replace('#--REPLY above this line to respond--(.*?)</section>)#s', ' ', $message); it inserts the entire email. Any suggestion on what i am doing wrong?

    Read the article

  • Execute client & server side code with one click?

    - by Abu Hamzah
    i am not sure if my design have flaw but would like to know what others have to say, i am in a situation where i am trying to acheive two things in one click. using : asp.net web form i have a web form with few textbox and a gridview control and a button. if i click on the button i am executing two things 1) asynchronously get data from server to client (working great) and able to display the data in the textboxes. 2) same click i want to bind the gridview. <asp:Content ID="Content2" ContentPlaceHolderID="cphMaster" runat="server"> <asp:Label runat="server" ID='Label1' >Id:</asp:Label> <asp:TextBox ID="txtId" runat='server'></asp:TextBox> <asp:Button ID="btnSubmit" OnClientClick="LoadDataById();" runat="server" Text="Submit" onclick="btnSubmit_Click" /> <br /> <br /> <asp:TextBox ID="txtName" runat='server'></asp:TextBox> <br /> <asp:TextBox ID="txtPurpose" runat='server'></asp:TextBox> <br /> <br /> <asp:GridView ID="GridView1" runat="server"> </asp:GridView> </asp:Content> server side protected void btnSubmit_Click(object sender, EventArgs e) { GridView1.DataSource = laodData(int.Parse(txtId.Text)); GridView1.DataBind(); } Jquery: function LoadVisitBasicByVisitId() { ContactServiceProxy.invoke({ serviceMethod: "GetDataById", data: { request: request }, callback: function(response) { processCompletedContactStore(response); }, error: function(xhr, errorMsg, thrown) { postErrorAndUnBlockUI(xhr, errorMsg, thrown); } }); return false; } recap: 1) jquery script execute asynchronously to get data from server to client and display in the textboxes 2) server side code to bind the gridview.

    Read the article

  • how can i send jquery ajax http request with php

    - by testkhan
    i have following form... <form action="http://mydomain.com/get.php" method="post"> <input type="hidden" value="thisisvalue" name="hdnvalue"> <input type="text" name="cost" id="cost"><br><br> <textarea id="msg" name="message"></textarea><br><br> <input type="submit" value="Send" id="send"> </form> the get.php file will response in 1 or 0 i.e 1 means recieved and 0 means not recieved now i want to send it to http://mydomain.com/get.php via http request with jquery ajax how can i do that get the returned value..

    Read the article

  • PHP date/time help/

    - by NOW
    I keep getting a value of 0 for $years and $months when there should be a value other then 0 can someone tell me what I'm doing wrong with my code? And what I need to fix? I'm trying to subtract two dates. Here is my PHP code. $delete_date = "2000-01-12 08:02:39"; $current_date = date('Y-m-d H:i:s'); //current date $diff = abs(strtotime($current_date) - strtotime($delete_date)); $years = floor($diff / (365*60*60*24)); $months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24)); echo $current_date . '<br />'; echo $delete_date. '<br />'; echo $diff. '<br />'; echo $years. '<br />'; echo $months. '<br />';

    Read the article

  • php validation code format

    - by user2970887
    Okay I have this MySQL database form and am trying to add validation to it. After 2 days of fighting with it, I thought I would get some advice. Would like that the selected item from dropdown and Firstname, Phone, Email, are all required. Then I want to verify that the data in the Firstname, Lastname, Phone (doesn't have to be any special format), Email and Comments are all acceptable formats before putting in database. Here is what I have so far: <?php include('inc_header.php'); if(isset($_POST['add'])) { require('dbcon.php'); if(! get_magic_quotes_gpc() ) { $Id = addslashes ($_POST['Id']); $List = addslashes ($_POST['List']); $Firstname = addslashes ($_POST['Firstname']); $Lastname = addslashes ($_POST['Lastname']); $Phone = addslashes ($_POST['Phone']); $Email= addslashes ($_POST['Email']); $Calltime = addslashes ($_POST['Calltime']); $Comment = addslashes ($_POST['Comment']); } else { $Id = $_POST['Id']; $Date = $_POST['Date']; $List = $_POST['List']; $Firstname = $_POST['Firstname']; $Lastname = $_POST['Lastname']; $Phone = $_POST['Phone']; $Email = $_POST['Email']; $Calltime = $_POST['Calltime']; $Comment = $_POST['Comment']; } $error = ''; //put chosen function here function validate_Firstname($input, $pattern = "/([A-Za-z0-9])") { return !preg_match($pattern, $input); } function validate_Phone($input, $pattern = "/([A-Za-z0-9])") { return !preg_match($pattern, $input); } function isValidEmail( $Email ){ return filter_var( $Email, FILTER_VALIDATE_EMAIL ); } //get values and validate each one as required $List = mysql_real_escape_string($_POST['List']); if(!$List){ $error .= "Please choose one<br />"; } $Firstname = mysql_real_escape_string($_POST['Firstname']); if(!$Firstname){ $error .= "First name is required<br />"; } //get values and validate each one as required $Lastname = mysql_real_escape_string($_POST['Lastname']); if(!$Lastname){ $error .= "Last name is required<br />"; } //repeat for each field $Email = mysql_real_escape_string($_POST['Email']); if(!isValidEmail($Email)){ $error .= "The email entered is invalid<br />"; } //and so on... if(!$error){ //add insert into database code here $sql = "INSERT INTO contacts ". "(`Id`,`Date`,`List`,`Firstname`,`Lastname`,`Phone`,`Email`,`Calltime`,`Comment`)". "VALUES'$Id,','$Date','$List','$Firstname','$Lastname','$Phone','$Email','$Calltime','$Comment') "; mysql_select_db('hmintcwa_contacts'); $retval = mysql_query( $sql, $conn ); if(! $retval ) { die('Could not enter data: ' . mysql_error()); } echo "Entered data successfully<br /><br /><a href=contactsadd.php><font color=#000000>Back</font></a>\n"; mysql_close($conn); } else { ?> <form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" name="ContactForm"> <table bgcolor="#000000" width="500" cellpadding="5" cellspacing="1" border="0"> <input type="hidden" name="Id" id="Id"> <tr> <td bgcolor="#e9e9e9" align="right">Requested Info</td> <td bgcolor="#ffffff" align="left"><select name="List"> <option value="0" > Please Choose One </option> <option value="Market Analysis" > Market Analysis </option> <option value="Consultation" > Consultation </option></select></td></tr> <tr> <td bgcolor="#e9e9e9" align="right">Date</td> <input name="Date" type="hidden" id="Date" value="<? print(Date("l F d, Y")); ?>" /> <td bgcolor="#ffffff" align="left"><? print(Date("l F d, Y")); ?></td> </tr> <tr> <td bgcolor="#e9e9e9" align="right">Firstname</td> <td bgcolor="#ffffff" align="left"><input name="Firstname" type="text" size="20" id="Firstname"></td></tr> <tr> <td bgcolor="#e9e9e9" align="right">Lastname</td> <td bgcolor="#ffffff" align="left"><input type="text" name="Lastname" size="20" id="Lastname"></td> </tr> <tr> <td bgcolor="#e9e9e9" align="right">Phone</td> <td bgcolor="#ffffff" align="left"><input type="text" name="Phone" size="20" id="Phone"></td></tr> <tr> <td bgcolor="#e9e9e9" align="right">Email</td> <td bgcolor="#ffffff" align="left"><input type="text" name="Email" size="20" id="Email"></td></tr> <tr> <td bgcolor="#e9e9e9" align="right">Preferred Calltime</td> <td bgcolor="#ffffff" align="left"><input type="text" name="Calltime" size="20" id="Calltime"> &nbsp;&nbsp; If none put N/A</td></tr> <tr> <td bgcolor="#e9e9e9" align="right">Comment</td> <td bgcolor="#ffffff" align="left"><textarea name="Comment" cols="40" rows="8" id="Comment"></textarea></td></tr> <tr> <td bgcolor="#e9e9e9" align="right">&nbsp;</td> <td bgcolor="#ffffff" align="center"><br> <input name="add" type="submit" id="add" value="Add Contact"><input type="reset" name="Reset" value="Clear Form"><input type=button value="Cancel" onClick="history.go(-1)"><br>&nbsp; </td> </tr> </table> </form> <br>&nbsp;</center> <?php } ?> </body> </html> So far I just keep chasing error message. Please forgive formatting I am trying to learn be gentle.

    Read the article

  • Fetch multiple rows from SQL in PHP foreach item in array

    - by TrySpace
    I try to request an array of IDs, to return each row with that ID, and push each into an Array $finalArray But only the first result from the Query will output, and at the second foreach, it skips the while loop. I have this working in another script, so I don't understand where it's going wrong. The $arrayItems is an array containing: "home, info" $finalArray = array(); foreach ($arrayItems as $UID_get) { $Query = "SELECT * FROM items WHERE (uid = '" . cleanQuery($UID_get) . "' ) ORDER BY uid"; if($Result = $mysqli->query($Query)) { print_r($UID_get); echo "<BR><-><BR>"; while ($Row = $Result->fetch_assoc()) { array_push($finalArray , $Row); print_r($finalArray ); echo "<BR><><BR>"; } } else { echo '{ "returned" : "FAIL" }'; //. mysqli_connect_errno() . ' ' . mysqli_connect_error() . "<BR>"; } } (the cleanQuery is to escape and stripslashes) What I'm trying to get is an array of multiple rows (after i json_encoded it, like: {"finalArray" : { "home": {"id":"1","created":"0000-00-00 00:00:00","css":"{ \"background-color\" : \"red\" }"} }, { "info": {"id":"2","created":"0000-00-00 00:00:00","css":"{ \"background-color\" : \"blue\" }"} } } But that's after I get both, or more results from the db. the print_r($UID_get); does print info, but then nothing.. So, why am I not getting the second row from info? I am essentially re-querying foreach $arrayItem right?

    Read the article

  • Manipulating values from database table with php

    - by charliecodex23
    I currently have 5 tables in MySQL database. Some of them share foreign keys and are interdependent of each other. I am displaying classes accordingly to their majors. Each class is taught during the fall, spring or all_year. In my database I have a table named semester which has an id, year, and semester fields. The semester field in particular is a tinyint that has three values 0, 1, 2. This signifies the fall, spring or all_year. When I display the query instead of having it show 0 or 1 or 2 can I have it show fall, spring etc? Extra: How can I add space to the end of each loop so the data doesn't look clustered? Key 0 Fall 1 Spring 2 All-year PHP <? try { $pdo = new PDO ("mysql:host=$hostname;dbname=$dbname","$username","$pw"); } catch (PDOException $e) { echo "Failed to get DB handle: " . $e->getMessage() . "\n"; exit; } $query = $pdo->prepare("SELECT course.name, course.code, course.description, course.hours, semester.semester, semester.year FROM course LEFT JOIN major_course_xref ON course.id = major_course_xref.course_id LEFT JOIN major ON major.id = major_course_xref.major_id LEFT JOIN course_semester_xref ON course.id = course_semester_xref.course_id LEFT JOIN semester ON course_semester_xref.semester_id = semester.id"); $query->execute(); if ($query->execute()){ while ($row = $query->fetch(PDO::FETCH_ASSOC)){ print $row['name'] . "<br>"; print $row['code'] . "<br>"; print $row['description'] . "<br>"; print $row['hours'] . " hrs.<br>"; print $row['semester'] . "<br>"; print $row['year'] . "<br>"; } } else echo 'Could not fetch results.'; unset($pdo); unset($query); ?> Current Display Computer Programming I CPSC1400 Introduction to disciplined, object-oriented program development. 4 hrs. 0 2013 Desire Display Computer Programming I CPSC1400 Introduction to disciplined, object-oriented program development. 4 hrs. Fall 2013

    Read the article

  • CheckBOX ASP MVC

    - by NewmanASPMVC
    Hi i am new to ASP.NET MVC. I am not sure how to deal with Check box or Radio Button to get values when they are clicked. Can any one help me? I am providing a simple code that might help you understand what i meant to be. Please share examples. <script type="text/javascript" > function check(browser) { document.getElementById("answer").value=browser; } </script> <form action=""> <input type="radio" name="browser" onclick="check(this.value)" value="Internet Explorer"/>Internet Explorer<br /> <input type="radio" name="browser" onclick="check(this.value)" value="Firefox"/>Firefox<br /> <input type="radio" name="browser" onclick="check(this.value)" value="Netscape"/>Netscape<br /> <input type="radio" name="browser" onclick="check(this.value)" value="Opera"/>Opera<br /> <br /> Your favorite browser is: <input type="text" id="answer" size="20"/> </form>

    Read the article

  • php: parse error on mysql query

    - by dwstein
    I'm getting the following error: Parse error: syntax error, unexpected T_VARIABLE in /home/a4999406/public_html/willingLog.html on line 48 on the following code (line 48 is first row of this code): $rows = mysql_num_rows($result); for ($j=0; $j<$rows: ++$j) { echo 'ID: ' . mysql_result($result, $j, 'id') . '<br />'; echo 'First: ' . mysql_result($result, $j, 'first') . '<br />'; echo 'Last: ' . mysql_result($result, $j, 'last') . '<br />'; echo 'Email: ' . mysql_result($result, $j, 'email') . '<br />'; } Anyone know what i'm doing wrong?

    Read the article

  • Javascript .removeChild() only deletes even nodes?

    - by user1476297
    first posting. I am trying dynamically add children DIV under a DIV with ID="prnt". Addition of nodes work fine no problem. However strange enough when it comes to deleted nodes its only deleting the even numbered nodes including 0. Why is this, I could be something stupid but it seem more like a bug. I could be very wrong. Please help Thank you in advance. <script type="text/javascript"> function displayNodes() { var prnt = document.getElementById("prnt"); var chlds = prnt.childNodes; var cont = document.getElementById("content"); for(i = 0; i < chlds.length; i++) { if(chlds[i].nodeType == 1) { cont.innerHTML +="<br />"; cont.innerHTML +="Node # " + (i+1); cont.innerHTML +="<br />"; cont.innerHTML +=chlds[i].nodeName; cont.innerHTML +="<br />"; } } } function deleteENodes() { var prnt = document.getElementById("prnt"); var chlds = prnt.childNodes; for(i = 0; i < chlds.length; i++) { if(!(chlds[i].nodeType == 3)) { prnt.removeChild(chlds[i]); } } } function AddENodes() { var prnt = document.getElementById("prnt"); //Only even nodes are deletable PROBLEM for(i = 0; i < 10; i++) { var newDIV = document.createElement('div'); newDIV.setAttribute("id", "c"+(i)); var text = document.createTextNode("New Inserted Child "+(i)); newDIV.appendChild(text); prnt.appendChild(newDIV); } } </script> <title>Checking Div Nodes</title> </head> <body> <div id="prnt"> Parent 1 </div> <br /> <br /> <br /> <button type="button" onclick="displayNodes()">Show Node Info</button> <button type="button" onclick="deleteENodes()">Remove All Element Nodes Under Parent 1</button> <button type="button" onclick="AddENodes()">Add 5 New DIV Nodes</button> <div id="content"> </div> </body>

    Read the article

  • Server currently under DDOS, not sure what to do

    - by Volex
    My web server is currently under a DDOS attack I believe, the messages log is full of these kind of messages: May 13 15:51:19 kernel: nf_conntrack: table full, dropping packet. May 13 15:51:19 last message repeated 9 times May 13 15:51:24 kernel: __ratelimit: 78 callbacks suppressed May 13 15:51:24 kernel: nf_conntrack: table full, dropping packet. May 13 15:52:06 kernel: possible SYN flooding on port 80. Sending cookies. and a netstat has a huge amount of the following: tcp 0 0 my.host.com:http bb176da0.virtua.com.br:4998 SYN_RECV tcp 0 0 my.host.com:http 187.0.43.109:2694 SYN_RECV tcp 0 0 my.host.com:http 109.229.4.145:1722 SYN_RECV tcp 0 0 my.host.com:http 189-84-163-244.sodobr:63267 SYN_RECV tcp 0 0 my.host.com:http bd66839d.virtua.com.br:3469 SYN_RECV tcp 0 0 my.host.com:http 69.101.56.190.dsl.int:52552 SYN_RECV tcp 0 0 my.host.com:http pc-62-230-47-190.cm.vt:2262 SYN_RECV tcp 0 0 my.host.com:http 189-84-163-244.sodobr:63418 SYN_RECV tcp 0 0 my.host.com:http pc-62-230-47-190.cm.vt:1741 SYN_RECV tcp 0 0 my.host.com:http zaq3d739320.zaq.ne.jp:2141 SYN_RECV tcp 0 0 my.host.com:http netacc-gpn-4-80-73.po:52676 SYN_RECV tcpdump shows: 7:11:08.564510 IP 187-4-1xx-4.xxx.ipd.brasiltelecom.net.br.54821 > my.host.com.http: S 999692166:999692166(0) win 65535 <mss 1452,nop,nop,sackOK> 17:11:08.566347 IP 114-44-171-67.dynamic.hinet.net.1129 > my.host.com.http: S 605369055:605369055(0) win 65535 <mss 1440,nop,nop,sackOK> 17:11:08.570210 IP 200-101-13-130.pvoce300.ipd.brasiltelecom.net.br.5590 > my.host.com.http: S 2813379182:2813379182(0) win 16384 <mss 1460,nop,nop,sackOK> 17:11:08.571290 IP dsl-189-143-30-99-dyn.prod-infinitum.com.mx.1615 > my.host.com.http: S 281542700:281542700(0) win 65535 <mss 1452,nop,nop,sackOK> 17:11:08.583847 IP dsl-189-143-30-99-dyn.prod-infinitum.com.mx.1617 > my.host.com.http: S 499413892:499413892(0) win 65535 <mss 1452,nop,nop,sackOK> 17:11:08.588680 IP 170.51.229.112.2569 > my.host.com.http: S 2195084898:2195084898(0) win 65535 <mss 1460,nop,nop,sackOK> 17:11:08.588773 IP gw2-1.211.ru.3180 > my.host.com.http: F 2315901786:2315901786(0) ack 2620913033 win 64240 17:11:08.590656 IP 200-101-13-130.pvoce300.ipd.brasiltelecom.net.br.5614 > my.host.com.http: S 2813715032:2813715032(0) win 16384 <mss 1460,nop,nop,sackOK> 17:11:08.591212 IP 203.82.82.54.15848 > my.host.com.http: S 4070423507:4070423507(0) win 16384 <mss 1400,nop,nop,sackOK> 17:11:08.591254 IP 203.82.82.54.2545 > my.host.com.http: S 1790910784:1790910784(0) win 16384 <mss 1400,nop,nop,sackOK> 17:11:08.591289 IP 203.82.82.54.28306 > my.host.com.http: S 578615626:578615626(0) win 16384 <mss 1400,nop,nop,sackOK> 17:11:08.591591 IP gw2-1.211.ru.3191 > my.host.com.http: F 2316435991:2316435991(0) ack 2634205972 win 64240 17:11:08.591790 IP 200-101-13-130.pvoce300.ipd.brasiltelecom.net.br.5593 > my.host.com.http: S 2813659017:2813659017(0) win 16384 <mss 1460,nop,nop,sackOK> 17:11:08.593691 IP gw2-1.211.ru.3203 > my.host.com.http: F 2316834420:2316834420(0) ack 2629074987 win 64240 I'm not sure what I can do to limit/mitigate this, currently no webpages are being served, any help gratefully appreciated.

    Read the article

  • I can't start mysql in ubuntu 11.04

    - by shomid
    I downloaded following files of Oracle.com: MySQL-server-5.5.28-1.linux2.6.i386.rpm<br/> MySQL-client-5.5.28-1.linux2.6.i386.rpm<br/> MySQL-shared-5.5.28-1.linux2.6.i386.rpm<br/> then with "alien -i" command installing rpm packages and when starting mysql get following error: Starting MySQL<br/> .... * The server quit without updating PID file (/var/lib/mysql/omid-desktop.pid). error log: 121117 13:21:30 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 121117 13:21:30 [Note] Plugin 'FEDERATED' is disabled. /usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist 121117 13:21:30 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 121117 13:21:30 InnoDB: The InnoDB memory heap is disabled 121117 13:21:30 InnoDB: Mutexes and rw_locks use InnoDB's own implementation 121117 13:21:30 InnoDB: Compressed tables use zlib 1.2.3 121117 13:21:30 InnoDB: Using Linux native AIO 121117 13:21:30 InnoDB: Initializing buffer pool, size = 128.0M 121117 13:21:30 InnoDB: Completed initialization of buffer pool 121117 13:21:30 InnoDB: highest supported file format is Barracuda. 121117 13:21:30 InnoDB: Waiting for the background threads to start 121117 13:21:31 InnoDB: 1.1.8 started; log sequence number 1595675 121117 13:21:31 [Note] Recovering after a crash using mysql-bin 121117 13:21:31 [Note] Starting crash recovery... 121117 13:21:31 [Note] Crash recovery finished. 121117 13:21:31 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306 121117 13:21:31 [Note] - '0.0.0.0' resolves to '0.0.0.0'; 121117 13:21:31 [Note] Server socket created on IP: '0.0.0.0'. 121117 13:21:31 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 121117 13:21:31 mysqld_safe mysqld from pid file /var/lib/mysql/omid-desktop.pid ended 121117 13:25:38 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 121117 13:25:38 [Note] Plugin 'FEDERATED' is disabled. /usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist 121117 13:25:38 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 121117 13:25:38 InnoDB: The InnoDB memory heap is disabled 121117 13:25:38 InnoDB: Mutexes and rw_locks use InnoDB's own implementation 121117 13:25:38 InnoDB: Compressed tables use zlib 1.2.3 121117 13:25:38 InnoDB: Using Linux native AIO 121117 13:25:38 InnoDB: Initializing buffer pool, size = 128.0M 121117 13:25:38 InnoDB: Completed initialization of buffer pool 121117 13:25:38 InnoDB: highest supported file format is Barracuda. 121117 13:25:38 InnoDB: Waiting for the background threads to start 121117 13:25:39 InnoDB: 1.1.8 started; log sequence number 1595675 /usr/sbin/mysqld: Too many arguments (first extra is 'start'). Use --verbose --help to get a list of available options 121117 13:25:39 [ERROR] Aborting 121117 13:25:39 InnoDB: Starting shutdown... 121117 13:25:40 InnoDB: Shutdown completed; log sequence number 1595675 121117 13:25:40 [Note] /usr/sbin/mysqld: Shutdown complete

    Read the article

  • Sending HTML to Gmail always lands in Spam

    - by cartaysm
    I am having an issue with sending HTML emails to Gmail. I can send them to Yahoo, Hotmail, RR, AOL, etc. with no problem at all, but when I send them to Gmail I get kicked to spam. I have checked my IP with a lot of different list to make sure it is not listed anywhere, which it is not. spamhaus = is not listed in the DBL abuse.net = is not listed in the SBL abuse.net = is not listed in the PBL abuse.net = is not listed in the XBL spamcop = not listed in bl.spamcop.net host 24.172.204.xxx xxx.204.172.24.in-addr.arpa domain name pointer xxxevents.com. host xxxevents.com xxxevents.com has address 24.172.204.xxx xxxevents.com mail is handled by 10 mail.xxxevents.com. I am just trying to send a very VERY basic HTML message (listed below). I use an Ubuntu server, swiftmailer, multipart/alternative (HTML & plain), SPF = pass, and I am going to setup DKIM today to see if that fixes it (but I doubt it will)... For now I will only post the message I sent that gets kicked to spam and can provide any details needed. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><title>Triathlon</title></head> <body> <table cellpadding="0" cellspacing="0"> <tr> <td> <p>Thank you for attending our 4th annual Triathlon/Duathlon/5k at Hueston Woods State Park on August 12th. This event is held annually to raise research funding for Crohn's Disease, Ulcerative Colitis, and Muscular Dystrophy diseases.</p> </td> </tr> <tr> <td> <p>As you know the results and pictures have been posted on our home page at since Sunday 8/13/2012. Now we also have updated our Facebook page with those photos and you can start tagging yourself or downloading the pictures now! <br /> our page and tag yourself at </p> <p> test test </p> <p>Race day events is professionally managed by Speedy-Feet</p> </td> </tr> </table> </body> </html> Just plain text works great, I thought maybe wording was messing me up but not the case... I am almost done install opendkim so I will be able to rule that out very soon. Edit: Okay installed opendkim and I am getting passing results so I sent the html I posted above it went through just fine. So now when I start to add a few more lines I am getting kicked back to spam again. Here is updated html code: ` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><title>Triathlon</title></head> <body> <table cellpadding="0" cellspacing="0"> <tr> <td> <center><a href='http://xxxevents.com' target="_blank"> <font face="Verdana, Arial, Helvetica, sans-serif" color="#666666" size="2"> <img src="http://xxxevents.com/marketemailimages/xxxlogo.png" alt="xxx It Events | Raising funds for Crohns, Colitis, and Muscular Dystrophy" border="0" /> </font></a></center> </td> <tr> <td> <p>Thank you for attending our 4th annual Triathlon/Duathlon/5k at Hueston Woods State Park on August 12th. This event is held annually to raise research funding for Crohn's Disease, Ulcerative Colitis, and Muscular Dystrophy diseases.</p> </td> </tr> <tr> <td> <p>As you know the results and pictures have been posted on our home page at since Sunday 8/13/2012. Now we also have updated our Facebook page with those photos and you can start tagging yourself or downloading the pictures now! <br /> our page and tag yourself at </p> <p> test test </p> <p>Race day events is professionally managed by Speedy-Feet</p> </td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top"> <div align="center" style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;"><br />PO Box xxx Maineville, OH 45039<br /> <a href="mailto:[email protected]">[email protected]</a> | <a href='http://xxxevents.com' target="_blank">xxxevents.com</a><br /> <br /> </div> </td> </tr> </table> </body> </html>`

    Read the article

  • IE9 Loses Some CSS After Particular Form Submit [migrated]

    - by Asherion
    The site I am editing has a search form. For the record, there are several other forms on the site, contact and the like. This is the only one with an issue. Upon submission of the form, SOME of the styling is lost in IE9 (possibly other versions of IE, haven't tested that yet). Primarily, the margins and colors set in html and body appear to have been lost. Menus, banner, text, etc all appear to retain styles. All styles are on one sheet, that are used here... Any helpful advice? Here is the contents of the search page and the php used to check for the form, if that helps, and the css that I think is lost. THE HTML: <div id="search"> <br /> <div style="float:right;font-size:.8em;"> <form name="form_sidesearch" action="search.html" method="post"> <input type="hidden" name="action" value="search" /> <input type="text" name="search_value" value="<?php echo $systems_primary->search_value ?>" /> <input type="submit" name="submit_search" value="Search Website" /> </form> <br /> </div> </div> <?php echo stripslashes($search_results); THE PHP: <?php // -- Begin Search -------------------------------------------------------------------------------------- if($_REQUEST["action"] === "search") { if(strlen($_REQUEST["pg"]) <= 0) { $_REQUEST["pg"] = 1; } $search_results = $systems_primary->search_website("index",urldecode($_REQUEST["search_value"]),"<div class=\"listing ui-corner-all\"><a href=\"{ENTRY_URL}\" title=\"{ENTRY_TITLE}\" class=\"listing_title\">{ENTRY_TITLE}</a>{ENTRY_CONTENT} <a href=\"{ENTRY_URL}\" title=\"{ENTRY_TITLE}\" style=\"font-size:.8em;\">...read more</a></div><br /><br />",345,"all",10,$_REQUEST["pg"]); } // -- End Search ---------------------------------------------------------------------------------------- ?> THE LOST CSS (could be more): html { background-color:#F6E6C8; font-size:16px; font:Helvetica; } body { width:1027px; margin:0 auto; background-color:#ffffff; font: arial, times new roman, sans-serif; }

    Read the article

  • pagination - 10 pages per page

    - by arthur
    I have a pagination script that displays a list of all pages like so: prev [1][2][3][4][5][6][7][8][9][10][11][12][13][14] next But I would like to only show ten of the numbers at a time: prev [3][4][5][6][7][8][9][10][11][12] next How can I accomplish this? Here is my code so far: <?php /* Set current, prev and next page */ $page = (!isset($_GET['page']))? 1 : $_GET['page']; $prev = ($page - 1); $next = ($page + 1); /* Max results per page */ $max_results = 2; /* Calculate the offset */ $from = (($page * $max_results) - $max_results); /* Query the db for total results. You need to edit the sql to fit your needs */ $result = mysql_query("select title from topics"); $total_results = mysql_num_rows($result); $total_pages = ceil($total_results / $max_results); $pagination = ''; /* Create a PREV link if there is one */ if($page > 1) { $pagination .= '< a hr_ef="?page='.$prev.'">Previous</a> '; } /* Loop through the total pages */ for($i = 1; $i <= $total_pages; $i++) { if(($page) == $i) { $pagination .= $i; } else { $pagination .= '< a hr_ef="index.php?page='.$i.'">'.$i.'</a>'; } } /* Print NEXT link if there is one */ if($page < $total_pages) { $pagination .= '< a hr_ef="?page='.$next.'"> Next</a>'; } /* Now we have our pagination links in a variable($pagination) ready to print to the page. I pu it in a variable because you may want to show them at the top and bottom of the page */ /* Below is how you query the db for ONLY the results for the current page */ $result=mysql_query("select * from topics LIMIT $from, $max_results "); while ($i = mysql_fetch_array($result)) { echo $i['title'].'<br />'; } echo $pagination; ?>

    Read the article

  • Apache is reponding a blank white page

    - by Bruno Araujo
    I have the following situation: A site hosted in apache 2.4, with ssl, that works like a charm for a while now, but out of no where, without modifications to the site, apache started serving random blank pages. The workaround this is to delete the cookies of the browser or restart the browser. I've switched the vitualhost to log in debug mode but it didn't got me anywhere. Here is the debug log of a failed page load: [Wed Oct 24 10:57:35.762547 2012] [ssl:info] [pid 27854:tid 140617706374912] [client 192.168.10.150:58917] AH01964: Connection to child 147 established (server xxx.com.br:443) [Wed Oct 24 10:57:35.762739 2012] [ssl:debug] [pid 27854:tid 140617706374912] ssl_engine_kernel.c(1966): [client 192.168.10.150:58917] AH02043: SSL virtual host for servername xxx.com.br found [Wed Oct 24 10:57:35.777479 2012] [ssl:debug] [pid 27854:tid 140617706374912] ssl_engine_kernel.c(1899): [client 192.168.10.150:58917] AH02041: Protocol: TLSv1, Cipher: DHE-RSA-AES256-SHA (256/256 bits) [Wed Oct 24 10:57:35.779912 2012] [ssl:debug] [pid 27854:tid 140617706374912] ssl_engine_kernel.c(243): [client 192.168.10.150:58917] AH02034: Initial (No.1) HTTPS request received for child 147 (server xxx.com.br:443) [Wed Oct 24 10:57:35.780044 2012] [authz_core:debug] [pid 27854:tid 140617706374912] mod_authz_core.c(809): [client 192.168.10.150:58917] AH01628: authorization result: granted (no directives) [Wed Oct 24 10:57:40.783950 2012] [ssl:info] [pid 27854:tid 140617706374912] (70007)The timeout specified has expired: [client 192.168.10.150:58917] AH01991: SSL input filter read failed. [Wed Oct 24 10:57:40.784077 2012] [ssl:debug] [pid 27854:tid 140617706374912] ssl_engine_io.c(988): [remote 192.168.10.150:58917] AH02001: Connection closed to child 147 with standard shutdown (server xxx.com.br:443)

    Read the article

  • Registering publicly Mail server and Web server in a free dns server

    - by Bruno Vieira
    I'm trying to host the e-mails and the site of our company into our private server. I've already followed the Gentoo Virtual Mailhosting System with Postfix Guide and my mail server is working (actually it sends mails for the local users and for external users it goes to spam) and know how to set an Apache 2 server. What I don't know (and I mean really don't) is how to make them public. I did some research and found that I should ask my ISP to change the reverse DNS to my company domain in order to prevent my mails to be marked as spam, they are doing. I already know I have to configure a DNS Server, it seems like my register provider already has one but I don't know how I can configure CNET, A, MX, TXT and all those tags (Is it tags the name?) and If I must do some other configuration on my server. My Server: Linux mail 3.2.21-gentoo #1 SMP My /etc/hosts: 127.0.0.1 mail.example.com.br example example.com.br ::1 mail.example.com.br mail example.com.br My /etc/conf.d/hostname: hostname ="mail" What am I missing? If there's a guide about how to configure I would really be grate. Thanks in advance for the help. Cheers

    Read the article

  • Is my webserver being abused for banking fraud?

    - by koffie
    Since a few weeks i'm getting a lot of 403 errors from apache in my log files that seem to be related to a bank frauding scheme. The relevant log entries look like this (The ip 1.2.3.4 is one I made up, I did not modify the rest of each line) www.bradesco.com.br:80 / 1.2.3.4 - - [01/Dec/2012:07:20:32 +0100] "GET / HTTP/1.1" 403 427 "-" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11" www.bb.com.br:80 / 1.2.3.4 - - [01/Dec/2012:07:20:32 +0100] "GET / HTTP/1.1" 403 370 "-" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11" www.santander.com.br:80 / 1.2.3.4 - - [01/Dec/2012:07:20:33 +0100] "GET / HTTP/1.1" 403 370 "-" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11" www.banese.com.br:80 / 1.2.3.4 - - [01/Dec/2012:07:20:33 +0100] "GET / HTTP/1.1" 403 370 "-" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11" the logformat I use is: LogFormat "%V:%p %U %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" The strange thing is that all these domains are domains of banks and 3 out of the 4 domains are also in the list of the bank frauding scheme described on: http://www.abuse.ch/?p=2925 I would really like to know if my server is being abused for bank frauding or not. I suspect not, because it's giving 403 to all requests. But any extra checks that I can do to ensure that my server is not being abused are welcome. I'm also curious on how the "bad guys" expected my server to behave. I.e. are they just expecting my server to act as a proxy to hide the ip of the fake site, or are they expecting that my server will actually serve the fake banking website? Is the ip 1.2.3.4 more likely to be the ip of a victim or the ip of a bad guy. I suspect a bad guy, because it's quite unlikely that a real person would visit 4 bank sites in a second. If it's from a bad guy I'm very curious at what he is trying to do.

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >