How to connect the comment id with the id of the image in dreamweaver

So I want to get the id_picture is show on the page and paste it into the id_picture of the observation of the table.

In the commentary to the table, I have the id_comment of columns, the id_picture, the text

I managed to post the comment on the page and this comment is also recorded in the comment table

but I can't get the id of the image where I comment on and put it in the database.

the image shown in gallery.php are taken from photo tabel and with formation of repetition and paging are displayed in the gallery.php

I tried to get the image id using the variable session, but when I load the Gallery shows tha id_piktur .php is poorly defined and in the tabel commentary

This column is populated with the value 0.

so I have this tabel I'll write them as I saved it in my database

database name is art

Tabel photo, I appointed piktur (Titulli, Pershkrimi, id_piktur, Piktur_url)

the tabel of comment I appointed komente(id_koment,id_piktur,Tekst)

Text is the column where the comment is saved.

Pleaseeeeeeeeeeeeee give me a little help. Thank you

It is the gallery.php code

<? php require_once('Connections/art.php');? >

<? PHP session_start()? >

<? PHP

If (! function_exists ("GetSQLValueString")) {}

function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

{

If (via PHP_VERSION < 6) {}

$theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

}

$theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

Switch ($theType) {}

case 'text ':

$theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

break;

case "long":

case "int":

$theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';

break;

case "double":

$theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';

break;

case "date":

$theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

break;

case "set":

$theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

break;

}

Return $theValue;

}

}

$currentPage = $_SERVER ['PHP_SELF'];

$editFormAction = $_SERVER ['PHP_SELF'];

If (isset {}

$editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);

}

If ((isset($_POST["MM_insert"])) & & ($_POST ["MM_insert"] == "form1")) {}

$insertSQL = sprintf (")

INSERT INTO komente (Tekst,id_piktur) VALUES (%s,'".$_SESSION['id_piktur']."')", GetSQLValueString($_POST['tekst'], "text"

));

@mysql_select_db ($database_art, $art);

$Result1 = mysql_query ($insertSQL, $art) or die (mysql_error ());

}

$maxRows_rsGallery = 1;

$pageNum_rsGallery = 0;

If (isset($_GET['pageNum_rsGallery'])) {}

$pageNum_rsGallery = $_GET ['pageNum_rsGallery'];

}

$startRow_rsGallery = $pageNum_rsGallery * $maxRows_rsGallery;

@mysql_select_db ($database_art, $art);

$query_rsGallery ="

SELECT Pershkrim, Piktur_url, Rankim,id_piktur FROM piktur

";

$query_limit_rsGallery = sprintf ("%s LIMIT %d, %d", $query_rsGallery, $startRow_rsGallery, $maxRows_rsGallery);

$rsGallery = mysql_query ($query_limit_rsGallery, $art) or die (mysql_error ());

$row_rsGallery = mysql_fetch_assoc ($rsGallery);

If (isset($_GET['totalRows_rsGallery'])) {}

$totalRows_rsGallery = $_GET ['totalRows_rsGallery'];

} else {}

$all_rsGallery = mysql_query ($query_rsGallery);

$totalRows_rsGallery = mysql_num_rows ($all_rsGallery);

}

$totalPages_rsGallery = ceil($totalRows_rsGallery/$maxRows_rsGallery)-1;

$maxRows_rsKomente = 10;

$pageNum_rsKomente = 0;

If (isset($_GET['pageNum_rsKomente'])) {}

$pageNum_rsKomente = $_GET ['pageNum_rsKomente'];

}

$startRow_rsKomente = $pageNum_rsKomente * $maxRows_rsKomente;

@mysql_select_db ($database_art, $art);

$query_rsKomente = "SELECT text, id_piktur FROM komente";

$query_limit_rsKomente = sprintf ("%s LIMIT %d, %d", $query_rsKomente, $startRow_rsKomente, $maxRows_rsKomente);

$rsKomente = mysql_query ($query_limit_rsKomente, $art) or die (mysql_error ());

$row_rsKomente = mysql_fetch_assoc ($rsKomente);

If (isset($_GET['totalRows_rsKomente'])) {}

$totalRows_rsKomente = $_GET ['totalRows_rsKomente'];

} else {}

$all_rsKomente = mysql_query ($query_rsKomente);

$totalRows_rsKomente = mysql_num_rows ($all_rsKomente);

}

$totalPages_rsKomente = ceil($totalRows_rsKomente/$maxRows_rsKomente)-1;

$queryString_rsGallery = "";

If (! empty($_SERVER['QUERY_STRING'])) {}

$params = explode ("&", $_SERVER ['QUERY_STRING']);

$newParams = array();

{foreach ($params as $param)

If (stristr ($param, "pageNum_rsGallery") == false & &)

stristr ($param, "totalRows_rsGallery") == false) {}

return ($newParams, $param);

}

}

If (count ($newParams)! = 0) {}

$queryString_rsGallery = '& '. htmlentities (implode ("&", $newParams));

}

}

$queryString_rsGallery = sprintf ("& totalRows_rsGallery = %d %s", $totalRows_rsGallery, $queryString_rsGallery);

? >

< ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""

" < html xmlns =" http://www.w3.org/1999/xhtml ">

< head >

< meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"

< title > < /title > paintings

< link href = "style_gallery.css" rel = "stylesheet" type = "text/css" / > "

< / head >

< body >

< / div >

< div id = "logo_wrapper" >

< div id = "logo" > < img src = "_images/logo.png" width = "600" height = "79" align = "right" / > < / div > "

< / div >

< div id = "main_container" >

< div id = "menu_container" >

< div id = 'menu' >

< ul id = "base_menu" >

< li > < a href = "index.php" > home < /a > < /li >

< li > < a href = "#" > on < /a > < /li >

< li > < a href = "gallery.php" > Gallery < /a > < /li > ""

< ul class = "sub_menu" >

< li > < a href = "#" title = 'Charcoal' > coal < /a > < /li >

< li > < a href = "#" title = "Oil paintings" > < /a > < /li > oil paintings

< li > < a href = "#" title = "Sketches" > sketch < /a > < /li >

< li > < a href = "#" title = "Our latest podcast" > Video Podcast < /a > < /li >

< /ul >

< li > < a href = "#" > Contact < /a > < /li >

< li > < a href = "#" > events < /a > < /li >

< li > < a href = "login.php" > Connect < /a > < /li >

< /ul >

< / div >

< / div >

< div id = "mainArticle" >

Gallery of paintings of < h1 > < / h1 >

< p > < / p >

< p >

<? PHP while ($row_rsKomente = mysql_fetch_assoc ($rsKomente)) {? >}

<? PHP

$id_piktur=$row_rsGallery['Id_piktur'];
$_SESSION['id_piktur']=$id_piktur;

echo $row_rsKomente ["text"]. "" < br / > ';? >

<? PHP}? >

< /p >

< form id = "form1" name = "form1" method = "POST" action = "<?" PHP echo $editFormAction;? > ">"

< p >

< label for 'comment' = > comment: < / label >

< /p >

< p >

< textarea = 'text' id = 'text' passes name = "45" lines = "5" > < / textarea >

< /p >

< input name = "comment" type = "submit" value = "Comment" / >

< input type = "hidden" name = "MM_insert" value = "form1" / >

< / make >

< p > < / p >

< p >

<? PHP if ($pageNum_rsGallery > 0) {/ / show if not first page? >}

< a href = "<?" PHP printf ("%s? pageNum_rsGallery = %d %s "(, $currentPage, 0, $queryString_rsGallery);?" > "> first < /a >"

<? PHP} / / show if not first page? >

<? PHP if ($pageNum_rsGallery > 0) {/ / show if not first page? >}

< a href = "<?" PHP printf ("%s? (pageNum_rsGallery = %d %s", $currentPage, max (0, $pageNum_rsGallery - 1), $queryString_rsGallery);? > "> back < /a >"

<? PHP} / / show if not first page? >

<? PHP if ($pageNum_rsGallery < $totalPages_rsGallery) {/ / Show if not last page? >}

< a href = "<?" PHP printf ("%s? (pageNum_rsGallery = %d %s", $currentPage, min ($totalPages_rsGallery, $pageNum_rsGallery + 1), $queryString_rsGallery);? > "> Next < /a > < a href =" <? PHP printf ("%s? (pageNum_rsGallery = %d %s", $currentPage, $totalPages_rsGallery, $queryString_rsGallery);? > "> last < /a >"

<? PHP} / / Show if not last page? >

< /p >

< class p = "galleryText" > < img src = "_images / <?" PHP echo $row_rsGallery ["Piktur_url"];? ">" alt = "golden gate bridge" class = "galleryImage" / >

<? PHP {? >}

<? PHP echo $row_rsGallery ["Pershkrim"];? >

<? PHP} while ($row_rsGallery = mysql_fetch_assoc ($rsGallery));? >

< /p >

< / div >

< p > < / p >

< / div >

< / body >

< / html >

<? PHP

mysql_free_result ($rsGallery);

mysql_free_result ($rsKomente);

? >

Capture.JPG

undefined.JPG

undefined1.jpg

Something still not freezing.

Take a look on

the _piktur idin the select is ok because it's the exact way, I named him in the tabel piktur

I have the indefinite id_piktur in this portion of the code line 152

$id_piktur = $row_rsGallery [' _pikturId'];

See the difference.

If id_piktur is a line of the table, it would follow that $row_rsGallery should contain id_piktur and Id_piktur. In other words, the code must be

$id_piktur = $row_rsGallery [' _pikturid'];

Tags: Dreamweaver

Similar Questions

  • How to connect the printer wireless hp with the computer?

    * - Original title - the printer printing

    How to connect the printer wireless hp with the computer?

    HP all what you need to be able to complete the task... See here...

    http://h71036.WWW7.HP.com/HHO/us/en/EP/articles/Wireless-Setup-Wizard.html

  • How to connect the Ombudsman with several bpel process

    Hi Please someone tell me how to connect the Ombudsman with several processes bpel in soa 11g

    And here

    http://eoracleapps.blogspot.com/2009/11/how-to-call-synchronous-BPEL-process.html

  • How to connect the cables to an AMD Radeon HD 7450 video card for two monitors individual work?

    I have a HP Pavilion p6-2360eo with the video card Radeon 7450 connected to a monitor of 23xi Pavilion.

    Now, I want to add a monitor of 23xi more, but I do not understand how to connect the cables to the video card to get two logical screen (different views on each monitor)

    Supposedly this monitor can connect to the video card, you have the HDMI connection.  Assuming that the first monitor is connected via DVI, then try a HDMI cable to the second.  I got this from the description of the video card on THIS page.

    Support up to two displays at the same time in these configurations: DVI, HDMI and VGA + HDMI (using the included adapter cable)

  • How to connect the keyboard for apple tv wireless?

    How to connect the keyboard for apple tv wireless?

    If you mean the 4th generation new Apple Tv, you cannot currently. It does not support keyboards at this time.

    If you mean the 3rd generation Apple Tv:

    Use a keyboard Apple Wireless with your Apple TV (2nd or 3rd generation) - Apple supported

  • How to connect the value of the input string to numeric values

    Hello

    I'm trying to figure out how to connect the value of unique user input string to numeric values. Basically I want the user to enter the name of a gas that I have a list for (I think I put the list of gases in a table >). Then I want to match numeric values 2 'a' and 'b', according to which gas, name of the user has set. These 'a' and 'b' values will be automatically matched with the name of the gas in a list that I put. For example, hydrogen gas has the value 3 for "a" and 4 for "b. when the user puts the ' hydrogen' name in a string constant, automatically 'a' and 'b' must be issued.» I have connect a and b to a formula

    Thanks for any help

    Hello

    It is perhaps not exactly what you are looking for, but perhaps you could use the enumerated data type and the array of clusters of points (a, b).

    Look at the VI I enclose.

  • How to connect the Officejet Pro 8100 printer to wireless network

    Bought a "nine" Officejet Pro 8100 and want to use via my wireless network. The CD supplied with the printer is obsolete. Updated Apple software but can't see how to connect the printer to the network. Getting Started Guide is no help on this issue. Searched for support without result pages. Utility HP does not provide a method to set up a wireless feature. Find all the instructions, I say first of all make sure that the printer is connected to the wireless network, and that's what I can't find out how. What I forget?

    Finally, I called HP hotline for help and was rescued. It turns out that Apple's software update software includes all the required components. The software from the HP Web site is no longer available. It's frustrating to see the Getting Started Guide refer frequently to the HP installation wizard and be unable to locate it. Once the wizard tech took control of my computer and installed the necessary software, it was a breeze!

    I also note that compose the support number to talk with a guy was rather brief: between 1 and 2 minutes, I recall. Although there was a menu of the phone, it was not a large (unlike the attempt labyrinthine and often circular to locate the online help).

    Insofar as HP knows the necessary software in not available via software update or directly from HP, wouldn't make sense to inform buyers, as well as how to access? At least do not place meaningless, useless on the Web site links that lead into oblivion and frustration!

    Although I did appreciate the journey, I finally arrive at my destination. Thanks to Aris, HP technician. You are exceptional!

  • How to connect the akai ATT01U

    How to connect the Akai ATT01U with my PC? (Windows 7)

    Johan Burgman

    With the supplied USB cable, I guess.  You probably have to install the software provided with the unit first.  Check job mode, manual quick start or any documentation that came with the device.

  • How to connect the URL of Web site companies existing on the new site I've built?

    How to connect the URL of Web site companies existing on the new site I've built?

    Hello

    If you want to use the current domain with your new business catalyst site, please follow this link

    User manual

    Let me know if you have any question.

  • How to connect the iMac 27 inches 5 K (end of 2014) as PC monitor

    Hello

    How to connect the iMac 27 inches 5 K (end of 2014) as PC monitor?

    Are there any adapter or cable that can help?

    Concerning

    M

    PCs have no support for the target Display Mode.

  • How to connect the slot button Cascades

    I am new to waterfalls and QML and yesterday I tried to port native QtWidget app to waterfalls, but it does not. The problem is, I add some buttons to the container in QML main file and coded my custom slot function which should be executed when the user click some button. But I don't know how to connect the clicked() signal to my function from the custom location.

    When using

    Connect (CloseButton, signal(Button::clicked()),this,slot(on_closeButton_clicked()));) or connect (exitButton, SIGNAL (clicked ()), this, SLOT (on_exitButton_clicked ())); I get error "unable to connect SIGNAL (null) to SLOT (on_closeButton_clicked ()) ' on all the buttons.

    Here is my code in app.cpp

    App::App()
    {
        QmlDocument *qml = QmlDocument::create("main.qml");
        qml->setContextProperty("cs", this);
    
        AbstractPane *root = qml->createRootNode();
        Application::setScene(root);
        textHolder = root->findChild("textHolder");
        openButton = root->findChild("openButton");
        saveButton = root->findChild("saveButton");
        saveAsButton = root->findChild("saveAsButton");
        closeButton = root->findChild("closeButton");
        exitButton = root->findChild("exitButton");
    
        connect(openButton,SIGNAL(Button::clicked()),this,SLOT(on_openButton_clicked()));
        connect(saveButton,SIGNAL(Button::clicked()),this,SLOT(on_saveButton_clicked()));
        connect(saveAsButton,SIGNAL(Button::clicked()),this,SLOT(on_saveAsButton_clicked()));
        connect(closeButton,SIGNAL(Button::clicked()),this,SLOT(on_closeButton_clicked()));
        connect(exitButton,SIGNAL(clicked()),this,SLOT(on_exitButton_clicked()));
    }
    
    //one slot function
    
    void App::on_closeButton_clicked()
    {
    //ui->textEdit->clear();
        textHolder->resetText();
    //if(file.open(QIODevice::ReadOnly | QIODevice::Text)){
        file.close();
        fileName.clear();
    //}
    }
    

    And qml

    import bb.cascades 1.0
    
    Page {
        id: mainPage
        content:
        Container {
        id: main
        Container {
        id: buttonHolder
        scrollMode: ScrollMode.None
                layout: StackLayout {
                    layoutDirection: LayoutDirection.LeftToRight
                    leftPadding: 5.0
                    rightPadding: 5.0
                    topPadding: 5.0
                    bottomPadding: 5.0
                }
                touchPropagationMode: TouchPropagationMode.None
                objectName: "buttonHolder"
                Button {
                    id: openButton
                    text: "Open"
                }
                Button {
                    id: closeButton
                    text: "Close"
                    onClicked: {
                    }
                }
                Button {
                    id: saveButton
                    text: "Save"
                    onClicked: {
                    }
                }
                Button {
                    id: saveAsButton
                    text: "Save As"
                    onClicked: {
                    }
                }
                Button {
                    id: exitButton
                    text: "Exit"
                }
            }
    
        //********************************
            Container {
                id: textHolderArea
                layout: AbsoluteLayout {
                }
                topMargin: 5.0
                leftMargin: 1.0
                rightMargin: 1.0
                bottomMargin: 2.0
                TextArea {
                    id: textHolder
                    textStyle.fontStyleHint: FontStyleHint.Default
                    layoutProperties: AbsoluteLayoutProperties {
                    }
                    leftMargin: 5.0
                    rightMargin: 5.0
                    preferredHeight: 645.0
                    textStyle.justification: TextJustification.Enabled
                    objectName: "textHolder"
                    text: ""
                }
            }
        //********************************
        }
    }
    

    And I have no idea how call my app.cpp C++ slot in my main QML file

    Your buttons should an objectName set to be visible to C++, the id is only visible inside the QML.

  • How to connect the bluetooth iball-groovy head game

    How to connect the bluetooth iball-groovy head game

    Hi Gurushankar,

    You can consult the following articles and check.

    Connect to Bluetooth and other wireless or network devices

    http://Windows.Microsoft.com/en-us/Windows7/connect-to-Bluetooth-and-other-wireless-or-network-devices

     

    Add a Bluetooth device or other wireless or network device: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows7/add-a-Bluetooth-or-other-wireless-or-network-device-frequently-asked-questions

    Hope this information helps.

  • Is there anyone know how to connect the "HP PSC 2355 all in one for iPhone 4S?

    Is there anyone know how to connect the "HP PSC 2355 all in one for iPhone 4S?

    Hello

    First of all, please check if your printer in the list:

    http://support.Apple.com/kb/ht4356

    If so, you can use this hotfix/install:

    iPhone: http://www.Apple.com/support/iPhone/Assistant/AirPrint/

    If NOT you must print using other applications (if applicable) such as

    http://iTunes.Apple.com/au/app/HP-eprint/id299531647?Mt=8

    Kind regards.

  • If anyone can help with how to get the image

    a database in a view using Dreamweaver page?

    I have a page with a recordset and a database with text and images. The image field has a link to the file and the image as in /images/image1.jpg including the size.

    The thumbnail I want to display on a page of the main display is in the database using varchar with a link like /images/image1.jpg

    When someone wants to see the master page, they click on a link and everything which has been entered showing the database. At least everything except the image.  Right now it shows just /images/image1.jpg

    I don't know how to call the images to the database.

    Thanks for the help and information.

    conch,

    Check the entry of the database, and you may also have too many tags...

    In addition, check to see if your pictures folder is in the root directory, such as an incorrect path can complicate things.

    If this site is located on a remote server, feel free to send me the link here or by e-mail: [email protected]

    In addition, if you have a screenshot, it would be useful.

    Hang on!

    See you soon,.

    wordman

  • How to connect a Toshiba TL838 with facebook profile?

    How to connect a Toshiba TL838 with facebook profile?
    When I try to connect toshiba generate email with info and links for connect facebook with toshiba accounts places but when I click on the links I see only errors.

    _ * EDIT * _

    * Ok I flashed the QR code with my phone and now is connect :) *.

    Moderators please close thead

    Post edited by: junioreks

    > Ok I have flashed the QR code with my phone and connect now :)

    Thanks for sharing!

  • How to disable the image previews

    In the windows client there is an option to disable the image previews with

    Tools-> Options-> settings IM-> Show advanced options. Uncheck the option: "show images in conversations".

    In the client Mac there isn't this option. How to disable the image previews in a Mac client?

    OK, found the solution in another thread here: http://community.skype.com/t5/Mac/YouTube-thumbnails-amp-link-previews-Why-don ' t-I-see-them/m-p/39692...

    Menu bar-> display-> display Images-> uncheck

Maybe you are looking for