just curious. <img src="filepath.jpeg" id="idhere?" /> or <img id="idhere?" src="filepath.jpeg" /> which is valid? are they both vaild? and differences?

Member Avatar
Member Avatar
+0 forum 2

I have a problem with this code and i really can't understand what is it.. i have unique ID for every ticket and it works good but i have made a button to open a `modal (#myModal)` and from there to send the ticket to some username but the problem is no matter what ticket i choose to send just the first ticket code is shown also when i try to remove any ticket i can't, its just possible to remove the first ticket. <tr style="background-color: lavender;"> <th> <button type="submit" class="btn btn-primary btn-xs" name="share" value="<?= $ticket_id ?>" id="shareBtn" title="Share ticket" …

Member Avatar
Member Avatar
+0 forum 9

Hi. I'm working on my own CMS, i want the script to echo 3 posts in every page, and want the script to echo from the recent post and back to the oldest post. I mean like this: For example there is totaly 30 posts; First page => posts 30-29-28 Second page => posts 27-26-25 .... This is my script: <?php include('connection.php'); $error = FALSE; $result = FALSE; try { $row = $conn->query("SELECT MAX(id) AS last_id FROM Posts")->fetch(PDO::FETCH_OBJ); echo $row->last_id; echo "<hr>"; $last_id = $row->last_id; $total = $conn->query("SELECT COUNT(id) as rows FROM Posts") ->fetch(PDO::FETCH_OBJ); $perpage = 3; $posts = $total->rows; …

Member Avatar
Member Avatar
+0 forum 16

Hello everybody! There is a problem with my db table. For example i send 6 posts (with title, author and content) to the db table one after an other, so their post's id would be 1-2-3-4-5-6. Then if i delete the post number 6 and then write a new post (which it's id must be 7), after that when i echo all posts on the page to see them, i see posts with ids 1-2-3-4-5-7 !! How can i solve this problem? When i delete the post with id 6, the next post should be set there into id 6.

Member Avatar
Member Avatar
+0 forum 5

Hi everybody. I have a page with some post's title in it. I have put every title in an <a> tag. I want to click on each title and enter into an other page (single-post-page.php) to see the content of that post's title. The script of that page (single-post-page.php) should get that post's id when i click on the title's link to send it to the db and get that post's content to echo on the page. But my problem is that how i can send post's id to that (single-post-page.php) page by clicking on each title's link?

Member Avatar
Member Avatar
+0 forum 6

Hello. Look at this file please: register.php <?php $servername = "localhost"; $dbname = "mydbname"; $dbusername = "mydbusername"; $dbpassword = "mydbpassword"; try { $conn = new PDO("mysql:host=$servername;dbname=$dbname", $dbusername, $dbpassword); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "INSERT INTO Users (Username, Password) VALUES ('$username', '$password')"; $conn->exec($sql); } catch(PDOException $e) { echo $sql . "<br>" . $e->getMessage(); } $conn = null; ?> <html> <head> <title>Register Page</title> </head> <body> <form method="post"> Your Username: <input type="text" name="username"><br> Your Password: <input type="text" name="password"><br> <input type="submit" value="submit"> </form> </body> Why it can't send the username and password that gets from those two fields to the table? I checked the table, …

Member Avatar
Member Avatar
+0 forum 4

Hello, im trying to create a page that drag, drop and clone image on the drop plus dynamically add ids to the clones images. i sort of have it except the dynamic id part im not doing it right. $(document).ready(function(){ var cinemascreen = $("#cinema-screen"); var cinema = $("#cinema-wrapper"); var single = $(".single-chair"); var twin = $(".twin-chair"); var four = $(".four-chair"); cinemascreen.draggable({ containment: cinema, scroll: false }); single_chair = 0 $(".single-chair").draggable({ helper: "clone" }); $("#cinema-wrapper").droppable({ accept: ".single-chair", drop: function(event, ui) { $(this).append($(ui.draggable).clone()); var single_chair_id = "A" + single_chair; $("#cinema-wrapper .single-chair").attr('id', single_chair_id); $(single_chair_id).draggable({ containment: 'parent', }); single_chair ++; } }); }); page …

Member Avatar
+0 forum 0

Hi, so i found this topic on forum.jquery [Click Here](https://forum.jquery.com/topic/is-it-possible-to-set-id-to-dynamically-created-div) and there is a way to set and ID for a dynamically created div (copy paste from the forum): var x=3,y=3 for (var i=0; i<x; i++){ var line=$('<div>', {id:"X"+i } ).css({clear:'both',width:'100%'}).appendTo('body'); for(var j=0;j<y;j++){ $('<div>',{id:"X"+i+"_"+j}).css({float:'left',width:10,height:10,border:'2px solid red'}).appendTo(line) } } the question was asked two years ago so i dunno if i would have gotten a reply for my question that is why I a asking here. sorry though coz i know a lot of you dont like getting links that redirects outside of dani. anyway my question is if the above …

Member Avatar
Member Avatar
+0 forum 1

im using api for twitter post, when i post content, twitter not generate the status id, i got this below error Fatal error: Uncaught exception 'EpiTwitterNotAuthorizedException' with message '{"errors":[{"message":"Could not authenticate you","code":32}]}' in

Member Avatar
Member Avatar
+0 forum 2

I have a code in php that is being echoed in html: $tblAccounts .= "<td width=\"100\"><input title=\"$objRow->AccountCode\" name=\"chkAcctField[$objRow->AccountCode]\" id=\"chkAcctField[$objRow->Description]\" value=\"chkAcctField[$objRow->AccountCode]\" type=\"checkbox\" $strIsChecked>" . ucwords($objRow->Description) . "</td>"; now may problem is this... I don't know how will I get the value of the checkboxes clicked by the user.... when the names and ids are varying. And I need to get the values using javascript.... using getElement returns null. Please help.

Member Avatar
Member Avatar
+0 forum 1

The odd thing about these particular headphones is the marketing, in my opinion. The very bright colours, mine were what I can only describe as dayglo yellow, are not offset by any calmer touches; the same colour is applied to the wires, cups, buttons, jacks, headband, everything. It's a deliberate ploy to attract the Electronic Dance Music (EDM) fans, and the back of the box even states "EDM is taking over clubs and festivals all around the world, provoking the return of neon body paint, fluffy boots and glow sticks. In keeping with this trend, the KS iD headphones come …

Member Avatar
+0 forum 0

Hi there, this is the code of my contactcontroller.cs : using ContactMvc.Models; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace ContactMvc.Controllers { public class ContactController : Controller { // // GET: /Contact/ [HttpGet] public ActionResult Index() { return View(new ContactMessage()); } [HttpPost] [ValidateAntiForgeryToken] public ActionResult Index(ContactMessage post) { if (ModelState.IsValid) { using (var db = new ContactDatabase()) { post.DateSent = DateTime.Now; db.ContactMessages.Add(post); db.SaveChanges(); } TempData["ContactMessage"] = post; return RedirectToAction("SuccessfulMessage"); } return View(post); } public ActionResult SuccessfulMessage() { var message = (ContactMessage)TempData["ContactMessage"]; return View(message); } [NonAction] public ActionResult LogList() { var messages = new List<ContactMessage>(); using (var db …

Member Avatar
+0 forum 0

I have a flex slider and I want to place a div over the top so I can put a nav bar on there. It's not co-operating with me. Any help will be apreccatied. Thanks in advance. HTML <body><div class="container"> <div id="logo-nav" class="sixteen colums"> <img src="img/logo-white.png" class="logo"> </div> <div class="flexslider" id="flexslider"> <ul class="slides"> <li><img src="img/slider.jpg" /></li> <li><img src="img/slider.jpg" /></li> <li><img src="img/slider.jpg" /></li> </ul> </div> </div></body> CSS .logo{ float: left; position: relative; padding-left: 50px; } #logo-nav{ float: left; height: 50px; padding: 50px; position: relative; } #flexslider ul li{ float: left }

Member Avatar
Member Avatar
+0 forum 4

Hi there, this is my question : I would like to make te first page with a list coming from database (how to do?); Ex <p><a "href:secondpage.aspx">Record text</a</p> etc. etc. and from this list choosing one of the record, using the id of the record, and open the second page where i can edit all the values of the record, do i need to do this with querystring? (and showing to the user the id of the record on the addressbar of IE)? or there is another way that allow me to open one record without showing data to the …

Member Avatar
Member Avatar
+0 forum 6

Please help, i get this error when i run my script on my testing server Notice: Undefined index: id in index.php on line 5 Notice: Undefined offset: 1 in index.php on line 8 but on my actual website, it displays a blank page, with the background colour, how do i solve these issues Here is the code <?php session_start(); ob_start(); include_once('lib/config.php'); $id = explode('/',$_GET['id']); $_GET['id'] = $id[0]; $_GET['p'] = $id[1]; if(empty($_GET['id'])) $_GET['id']='twitter'; include_once('lib/facebook/facebook.php'); Please how do i solve this

Member Avatar
Member Avatar
+0 forum 9

In our college we practice python on ssh. This command prints all the computers ( processes ) logged in. ps -A | grep bash I was wondering how to obtain my process ID for that session.

Member Avatar
Member Avatar
+0 forum 4

Hello, I have a mysql query $query = "SELECT * FROM comments WHERE commenter_username IN (" . join(',', $list) . ") Or Number IN (" . join(',', $list) . ") ORDER BY comment_id DESC"; I want the query to select one row, the row with the highest id. Then store that id into a variable and then select a row thats id is lower than the previous id. so im thinking it would look something like this $query = "SELECT * FROM comments WHERE commenter_username IN (" . join(',', $list) . ") Or Number IN (" . join(',', $list) . …

Member Avatar
Member Avatar
+0 forum 3

Hi, I'm making a quick site and all the content is on one page, and I'm using a small menu with anchor links to make navigating to a certain part faster for the end user. I have two anchor links that work fine (About Me, My Projects) but the "Contact Me" link jumps to a random part of the "My Projects" section. A preview of the site is available here : http://dev.cuonic.com/cuonic.com/ I have checked the IDs, they correspond, there is no random "contact-me" ID lying around in the "My Projects" section, I've changed the ID, still happens, and this …

Member Avatar
Member Avatar
+0 forum 2

Hey guys, I've been tearing my hair out for some time trying to figure out why my jquery has suddenly stopped working. The jquery script that I have written is fairly simple: $(document).ready(function () { $("#pTab").addClass("active"); $("#pBtn").click(function () { $("#pTab").addClass("active"); $("#gTab").removeClass("active"); }); $("#gBtn").click(function () { $("#gTab").addClass("active"); $("#pTab").removeClass("active"); }); }); I reference this file as such: <%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="project.Default" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> <script type="text/javascript" src="Scripts/CustomScripts/Default.js"></script> <title> Home </title> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server"> <div class="containerCustom"> <ul class="navCustom nav-tabsCustom"> <li id="pTab" runat="server"> <a id="pBtn" runat="server" href="#">Tab 1</a> </li> <li id="gTab" runat="server"> <a id="gBtn" runat="server" href="#">Tab …

Member Avatar
Member Avatar
+0 forum 5

Hello to everyone, I Have a table inside 2 div's and I need to get the tables id! How can I do this by javascript?

Member Avatar
Member Avatar
+0 forum 2

If we want to create User ID in System, How can we assign the same user ID to different User in Linux

Member Avatar
Member Avatar
+0 forum 3

Hi everybody, I'd like to know if there is a way to retrieve the id of a youtube video when it plays in a youtube xl page because on youtube xl the url is always "http://youtube.com/xl/" on any video. Thank you in advance.

Member Avatar
Member Avatar
+0 forum 3

Hi, I'm getting this error: **Column 'id' cannot be null**. I can't figure it out why. I always **Import** the tables by using **.sql** into **MyPHPAdmin**. I only have **2** tables. One is **mypost** and the other **username**. For my **.sql** file I always have the same format with **NOT NULL** for all the data but this time around it doesn't work. I try to leave it out but I still get **Column 'id' cannot be null** The only thing I always fill in is in the **username** table which is the **username** and **password**. When I open the admin …

Member Avatar
Member Avatar
+0 forum 5

i want to Autogenerate id column in my database table , my code is given below . it is not workin it is giving me Exception as "startIndex Cannot be larger than Length of string , parameter:startIndex ".how should i solve it Private Sub AutoGenerateNo() Dim no As String Try cmd = New SqlCommand("select count(*) from Academic", conn) no = cmd.ExecuteScalar no = no.Substring(2) no = CInt(no) + 1 If no > 0 And no <= 9 Then txtSessionId.Text = ("A000" + no) ElseIf no > 9 And no <= 99 Then txtSessionId.Text = ("A00" + no) ElseIf no > …

Member Avatar
Member Avatar
+0 forum 2

i have a MySQL table with the following columns: employeeID, firstName, lastName, gender, salary. whenever i insert a new record for this table i want to be able to retrieve the employeeID of that record. how should i write the commands in VB.Net

Member Avatar
Member Avatar
+0 forum 2

Hi all i have a form as follows: ** file1.php** <form action="<?php echo $editFormAction; ?>" method="POST" enctype="multipart/form-data" name="tblMovment" id="tblMovment"> <input name="MovDate" type="text" /> <input name="MovAmount" type="text" /> <input type="submit" name="submit" id="submit" value="add invoice" /> </form> 1. **I want to pass the Auto increment ID of the table above to another page (attach.php) then i can use it $_POST['ID'] to attach a file to the above "Invoice" ? ** 2. **Is there any way to attach the files in the same form (I have two separated mySql Table one for Files(that ATTACHED to Invoices table) an the other for Invoices)??**

Member Avatar
Member Avatar
+0 forum 2

I have gotten a php file where users can create their own user ids and login and out with them and it saves their name in mysql, now i want these users to be able to upload small videos, can someone please tell me a php code for how a user can log in to their account and upload a video and next time they log in they can see what videos they uploaded and can view other peoples videos.

Member Avatar
Member Avatar
+0 forum 6

I have a jQuery tabs slider that auto rotates and depending on the slide it will adjust the background of the `<div>` element it is in. Auto rotate goes fine, the correct background is loaded, but when I manually click the tabs, it doesn't take the correct values. It's almost like it's 1 behind. Below is the HTML code <div id="featured"> <ul class="ui-tabs-nav"> <li class="ui-tabs-nav-item"> <a href="#fragment-1" id="active-1" class=""><span style="background-color: #94d1e3; background-image: url(uploads/tx_background_img/banner_bg2.jpg); display:none;"></span><span>Test</span></a> </li> <li class="ui-tabs-nav-item ui-tabs-selected"> <a href="#fragment-2" id="active-2" class=""><span style="background-color: #e6c8a6; background-image: url(uploads/tx_background_img/banner_bg.png); display:none;"></span><span>Test1</span></a> </li> <li class="ui-tabs-nav-item"> <a href="#fragment-3" id="active-3" class=""><span style="background-color: #94d1e3; background-image: url(uploads/tx_background_img/banner_bg2_01.jpg); display:none;"></span><span>Test2</span></a> </li> …

Member Avatar
Member Avatar
+0 forum 6

Hi all, I have a new website that has a portfolio page. Currently, the code is such: <input type="image" src="_images/01.png" id="01" alt="" onclick="document.getElementById('outputDiv').innerHTML = '<section class=gallery><img src=_images/img01.jpg>' + '<p>Image name - by Photographer</p></section>';" /> This seems extremely cumbersome and is impractical for a site that could have many images on several pages since the above code was for just one image. I would like to have a function that looked at the thumbnail image id and took that id number and placed it in an outputDiv text string as such: function ShowImg() { var img; img = document.getElementById('').value; document.getElementById('outputDiv').innerHTML = …

Member Avatar
Member Avatar
+0 forum 2

Duplicate

Member Avatar
Member Avatar
+0 forum 2

The End.