Stefce 146 Posting Pro

No i just need to remove this error line because it shows the info lines and works well

Stefce 146 Posting Pro

Why i get this error Notice: Trying to get property of non-object in C:\xampp\htdocs\asdf\navigation.php on line 214 i have this code:

<?php
                                    if(isset($_POST['sendTicket'])) {
                                        $ticketID = $_POST['ticketID'];
                                        $ticketReceiver = $_POST['ticketReceiver'];

                                        $ticket_id = getUserData('kladilnica', 'ticket_id');
                                        $sender = getUserData('users', 'Username');

                                        if(!empty($ticketID) && !empty($ticketReceiver)) {
                                            $sql = "INSERT INTO ticket (senderName, receiverName, Date, ticketID, match1, match2, match3, match4, match5, match6, match7, match8, match9, match10, match11, match12, match13, match14, match15, match16, tip1, tip2, tip3, tip4, tip5, tip6, tip7, tip8, tip9, tip10, tip11, tip12, tip13, tip14, tip15, tip16, Bet, Gain, Odd) 
                                            SELECT Username, '".$ticketReceiver."', Date, ticket_id, match1, match2, match3, match4, match5, match6, match7, match8, match9, match10, match11, match12, match13, match14, match15, match16, tip1, tip2, tip3, tip4, tip5, tip6, tip7, tip8, tip9, tip10, tip11, tip12, tip13, tip14, tip15, tip16, Uplata, Dobivka, Odds FROM kladilnica WHERE ticket_id='".$ticketID."' AND `Username`='".$ticketReceiver."'";
                                            $result = $conn->query($sql);
                                            if($result === false) {
                                                trigger_error('Wrong SQL: ' . $sql . ' Error: ' . $conn->error, E_USER_ERROR);
                                            } else {
                                                if($ticketReceiver == $sender) {
                                                ?>
                                                    <p>You cannnot send to yourself!</p>
                                                <?php
                                                } else {
                                                    if($result->num_rows > 0) {
                                                    ?>
                                                        <p>Sended successfully</p>
                                                    <?php
                                                    } else {
                                                    ?>
                                                        <p>Invalid Ticket or Receiver</p>
                                                    <?php
                                                    }
                                                }
                                            }
                                        } else {
                                        ?>
                                            <p>Can't leave empty</p>
                                        <?php
                                        }
                                    }
                                ?>

Btw the line 214 is this line if($result->num_rows > 0)

Stefce 146 Posting Pro

hmm i get it but not at all, i have table kladilnica and im getting the values title, text, and date for ex. so in your example you have one more row which is to but i dont have that row in the database i dont understand what i need to do. Should i create one more row and that row to be the noteReceiver if yes, what if i want to send it to two users the note ?

Stefce 146 Posting Pro

Hello i cant understand how i can send database info to user for example i want to send my note which contain (date, text, title and other info) and this info is under ID for ex. (123456) please someone explain me how i can do that or help me thank you :)

Stefce 146 Posting Pro

@AndrewRoosevelt hmm the account works fine but anyway... okey first of all i want a better design for my website (on every screen size to look as it is), secound my code is a little messed up (the HTML, CSS and PHP are on the same file) third i dont know how to make the tickets to can be sended to users... but thats not for this discussion.. hope you understand me :)
Here is an example how i want to look but like i said to be the same on every screen size: http://oi61.tinypic.com/vncw0p.jpg (BTW it look like this right now but NOT on every screen size).

Stefce 146 Posting Pro

@alisajjad160 i need help with the html and css also.. i have the whole code but i need just someone to rearange and to clean up a bit.

Stefce 146 Posting Pro

Well yeah, thank you for this its kinda what i want but not complite.. :D i know noone will help me for free but i can guarantee he will be paid after because i dont really have any money right now and also he can earn to be co-owner of the site and get paid of google adsense banners.. who knows maybe will be usefull site after all... thank you. :)
I know also you will say he is lying or he will scam me.. you have my word i will not do that.

  • Stefan
Stefce 146 Posting Pro

With this code its only possible to update just one row ? so if two users click "like" it will give error ?

Stefce 146 Posting Pro

But i want the menu to be on the left side like its now btw i really need help from someone i can't do it by my self because i don't really know much html and css and the structure is too bad like i said but not that complicated so i just need someone who know how to rearange the code... if someone know any program which will help me to do that or if someone really wants to help me please reply.

Stefce 146 Posting Pro

So i want to look more natural and styled and when zooming not to disorient the elements, the shared tickets not to go under the menuand to be good oriented.. i know too much i want but i really have no knowledge in html... also if you know how to work with some framework ex. bootstrap feel free to use it :)

Stefce 146 Posting Pro

Yup there is a website www.upstrey.com just you need to register, its not needed an correct email address and verification steps... or if you want you can connect with theese login details:
Email: asdf@gmail.com
Password: asdf1234

Stefce 146 Posting Pro

Hello everyone i really need some help about my website structure.. i have almost the full website but the structure is too bad and i cannot continue working... is there some good man/women to help me about it ?

Stefce 146 Posting Pro

Here is my full script for shared tickets: http://pastebin.com/63kepWWy , the ticket_id is not unique but does not have same numbers.

Stefce 146 Posting Pro

Like i said without that im able to like all tickets at once...

Stefce 146 Posting Pro

Hello everyone im working on like button which im a little confuzed with my problem i have this sql and im only able to like the tickets which are in my account

$sql = "UPDATE `kladilnica` SET Liked = Liked+1 WHERE ticket_id = '".$like."' AND Username = '".$user."'";

but without this line AND Username = '".$user."' im able to like all the tickets with one button click, can someone help me how i can solve this ?
-Thank you :)

Stefce 146 Posting Pro

Thank you very much btw the count variable is for counting the tickets as they are shared..

Stefce 146 Posting Pro

yeah something like that on every 10th Ticket

Stefce 146 Posting Pro

Hello i want to make to show adds but on every 10th ticket i have tried with for loop but its adding too much adds here is the code:

if($is_active == 1 && $is_shared == 1) {
                        for($i=0; $i <= 1; $i++) {
                            echo "<table id='t01' style='margin: 5px;'><tr><th colspan='2'>Publisher: $publisher <img src='like-btn.png' width='21' height='21' style='position: responsive; cursor: pointer; align='right'> 0</img></th></tr>";
                            echo "<tr><th colspan='2'>Ticket ".$count." | <a style='font-size: 12px;'>Date: ".$date."</a></th></tr>";
                            echo "
                                    <tr><td>".$row["match1"]."</td><td>".$row["tip1"]."</td></tr>
                                    <tr><td>".$row["match2"]."</td><td>".$row["tip2"]."</td></tr>
                                    <tr><td>".$row["match3"]."</td><td>".$row["tip3"]."</td></tr>
                                    <tr><td>".$row["match4"]."</td><td>".$row["tip4"]."</td></tr>
                                    <tr><td>".$row["match5"]."</td><td>".$row["tip5"]."</td></tr>
                                    <tr><td>".$row["match6"]."</td><td>".$row["tip6"]."</td></tr>
                                    <tr><td>".$row["match7"]."</td><td>".$row["tip7"]."</td></tr>
                                    <tr><td>".$row["match8"]."</td><td>".$row["tip8"]."</td></tr>
                                    <tr><td>".$row["match9"]."</td><td>".$row["tip9"]."</td></tr>
                                    <tr><td>".$row["match10"]."</td><td>".$row["tip10"]."</td></tr>
                                    <tr><td>".$row["match11"]."</td><td>".$row["tip11"]."</td></tr>
                                    <tr><td>".$row["match12"]."</td><td>".$row["tip12"]."</td></tr>
                                    <tr><td>".$row["match13"]."</td><td>".$row["tip13"]."</td></tr>
                                    <tr><td>".$row["match14"]."</td><td>".$row["tip14"]."</td></tr>
                                    <tr><td>".$row["match15"]."</td><td>".$row["tip15"]."</td></tr>
                                    <tr><td>".$row["match16"]."</td><td>".$row["tip16"]."</td></tr>
                                ";
                            echo "<tr><th colspan='2'>Total Bet: $uplata_total</th></tr>";
                            echo "<tr><th colspan='2'>Total Win: $dobivka_total</th></tr>";
                            echo "<tr><th colspan='2'>Odds: $odd</th></tr>";
                            echo "</table>"; 
                            ?>
                            <div id="banner">
                                <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
                                    <!-- SecoundAd -->
                                    <ins class="adsbygoogle"
                                    style="display:inline-block;width:710px;height:100px"
                                    data-ad-client="ca-pub-5699416235054188"
                                    data-ad-slot="7054710957"></ins>
                                    <script>
                                    (adsbygoogle = window.adsbygoogle || []).push({});
                                </script>
                            </div>
                            <?php 
                            $count++;
                        }
                    }
Stefce 146 Posting Pro

I'm pretty sure that there is no software for likes because that is illegal by facebook terms and if there is the page will be delited immediately.

Stefce 146 Posting Pro

@diafol men i can't thank you enough what you do to me ... THANK YOU VERY MUCH

Stefce 146 Posting Pro

hehe no worries it happen sometimes :D btw when i click any Share button its sharing all the tickets so i think its selecting the whole column of tickets.

Stefce 146 Posting Pro

Yes i have tryed you can see in the example above its all in the code ... and now i have a problem with getting the correct ticket button.

Stefce 146 Posting Pro

Okay so here is my whole code and now it works but i cannot figure out how do i make just to work on the current button with this code its sharing all the tickets...

$user = getUserData('users', 'Username');
        $sql = "SELECT `Uplata`, `Dobivka`, `match1`, `match2`, `match3`, `match4`, `match5`, `match6`, `match7`, `match8`, `match9`, `match10`, `match11`, `match12`, `match13`, `match14`, `match15`, `match16`, `tip1`, `tip2`, `tip3`, `tip4`, `tip5`, `tip6`, `tip7`, `tip8`, `tip9`, `tip10`, `tip11`, `tip12`, `tip13`, `tip14`, `tip15`, `tip16`, `ticket_id`, `isActive`, `isShared` FROM `kladilnica` WHERE `Username`='$user'";
        $result = $conn->query($sql);
        $count = 0;
        $uplata_total = 0;

        if($result === false) {
            echo "<b>Could not connect to database.</b>";
            trigger_error('Wrong SQL: ' . $sql . ' Error: ' . $conn->error, E_USER_ERROR);
        } else {
            if($result->num_rows == 0) {
                echo "<b>You do not have any tickets.</b>";
            } else if($result->num_rows >= 1) {
                $count = $count + 1;
                while($row = $result->fetch_assoc()) {
                    if($result->num_rows != empty($row['match1'])) {
                        $uplata_total = $row["Uplata"];
                        $dobivka_total = $row["Dobivka"];
                        $ticket_id = $row["ticket_id"];
                        $is_active = $row["isActive"];
                        $shared = $row["isShared"];
                        if($is_active == 1) {
                            echo "<form action='home.php' method='POST'>";
                            echo "<table id='t02' style='margin-bottom: 10px;'><tr><th colspan='2'><input type='submit' name='share' class='share_button' value='Share'/></a></th></tr>";
                            echo "<tr><th colspan='2'>Ticket ".$count." <a style='position: relative; left: 69px;'>Ticket ID: ".$ticket_id."</a></th></tr>";
                            echo "
                                    <tr><td>".$row["match1"]."</td><td>".$row["tip1"]."</td></tr>
                                    <tr><td>".$row["match2"]."</td><td>".$row["tip2"]."</td></tr>
                                    <tr><td>".$row["match3"]."</td><td>".$row["tip3"]."</td></tr>
                                    <tr><td>".$row["match4"]."</td><td>".$row["tip4"]."</td></tr>
                                    <tr><td>".$row["match5"]."</td><td>".$row["tip5"]."</td></tr>
                                    <tr><td>".$row["match6"]."</td><td>".$row["tip6"]."</td></tr>
                                    <tr><td>".$row["match7"]."</td><td>".$row["tip7"]."</td></tr>
                                    <tr><td>".$row["match8"]."</td><td>".$row["tip8"]."</td></tr>
                                    <tr><td>".$row["match9"]."</td><td>".$row["tip9"]."</td></tr>
                                    <tr><td>".$row["match10"]."</td><td>".$row["tip10"]."</td></tr>
                                    <tr><td>".$row["match11"]."</td><td>".$row["tip11"]."</td></tr>
                                    <tr><td>".$row["match12"]."</td><td>".$row["tip12"]."</td></tr>
                                    <tr><td>".$row["match13"]."</td><td>".$row["tip13"]."</td></tr>
                                    <tr><td>".$row["match14"]."</td><td>".$row["tip14"]."</td></tr>
                                    <tr><td>".$row["match15"]."</td><td>".$row["tip15"]."</td></tr>
                                    <tr><td>".$row["match16"]."</td><td>".$row["tip16"]."</td></tr>
                                ";
                            echo "<tr><th colspan='2'>Total Bet: $uplata_total</th></tr>";
                            echo "<tr><th colspan='2'>Total Win: $dobivka_total</th></tr>";
                            echo "</table>";
                            echo "</form>";
                            $count++;
                        }
                    }

                    if(isset($_POST['share'])) {
                        if($shared == 0) {
                            echo "Ticket shared sucessfully.";
                            $sql = "UPDATE `kladilnica` SET `isShared`=1 WHERE `ticket_id`='$ticket_id'";
                            $return = $conn->query($sql);
                        } else …
Stefce 146 Posting Pro

Any other sulutions please ?
Here is how i show the tickets and share button

$user = getUserData('users', 'Username');
        $sql = "SELECT `Uplata`, `Dobivka`, `match1`, `match2`, `match3`, `match4`, `match5`, `match6`, `match7`, `match8`, `match9`, `match10`, `match11`, `match12`, `match13`, `match14`, `match15`, `match16`, `tip1`, `tip2`, `tip3`, `tip4`, `tip5`, `tip6`, `tip7`, `tip8`, `tip9`, `tip10`, `tip11`, `tip12`, `tip13`, `tip14`, `tip15`, `tip16`, `ticket_id`, `isActive`, `isShared` FROM `kladilnica` WHERE `Username`='$user'";
        $result = $conn->query($sql);
        $count = 0;
        $uplata_total = 0;

        if($result === false) {
            echo "<b>Could not connect to database.</b>";
            trigger_error('Wrong SQL: ' . $sql . ' Error: ' . $conn->error, E_USER_ERROR);
        } else {
            if($result->num_rows == 0) {
                echo "<b>You do not have any tickets.</b>";
            } else if($result->num_rows >= 1) {
                $count = $count + 1;
                while($row = $result->fetch_assoc()) {
                    if($result->num_rows != empty($row['match1'])) {
                        $uplata_total = $row["Uplata"];
                        $dobivka_total = $row["Dobivka"];
                        $ticket_id = $row["ticket_id"];
                        $is_active = $row["isActive"];
                        if($is_active == 1) {
                            echo "<form action='home.php' method='POST'>";
                            echo "<table id='t02' style='margin-bottom: 10px;'><tr><th colspan='2'><input type='submit' name='share' class='share_button' value='Share'/></a></th></tr>";
                            echo "<tr><th colspan='2'>Ticket ".$count." <a style='position: relative; left: 69px;'>Ticket ID: ".$ticket_id."</a></th></tr>";
                            echo "
                                    <tr><td>".$row["match1"]."</td><td>".$row["tip1"]."</td></tr>
                                    <tr><td>".$row["match2"]."</td><td>".$row["tip2"]."</td></tr>
                                    <tr><td>".$row["match3"]."</td><td>".$row["tip3"]."</td></tr>
                                    <tr><td>".$row["match4"]."</td><td>".$row["tip4"]."</td></tr>
                                    <tr><td>".$row["match5"]."</td><td>".$row["tip5"]."</td></tr>
                                    <tr><td>".$row["match6"]."</td><td>".$row["tip6"]."</td></tr>
                                    <tr><td>".$row["match7"]."</td><td>".$row["tip7"]."</td></tr>
                                    <tr><td>".$row["match8"]."</td><td>".$row["tip8"]."</td></tr>
                                    <tr><td>".$row["match9"]."</td><td>".$row["tip9"]."</td></tr>
                                    <tr><td>".$row["match10"]."</td><td>".$row["tip10"]."</td></tr>
                                    <tr><td>".$row["match11"]."</td><td>".$row["tip11"]."</td></tr>
                                    <tr><td>".$row["match12"]."</td><td>".$row["tip12"]."</td></tr>
                                    <tr><td>".$row["match13"]."</td><td>".$row["tip13"]."</td></tr>
                                    <tr><td>".$row["match14"]."</td><td>".$row["tip14"]."</td></tr>
                                    <tr><td>".$row["match15"]."</td><td>".$row["tip15"]."</td></tr>
                                    <tr><td>".$row["match16"]."</td><td>".$row["tip16"]."</td></tr>
                                ";
                            echo "<tr><th colspan='2'>Total Bet: $uplata_total</th></tr>";
                            echo "<tr><th colspan='2'>Total Win: $dobivka_total</th></tr>";
                            echo "</table>";
                            echo "</form>";
                            $count++;
                        }
                    }
                }
            }
        }
Stefce 146 Posting Pro

I want to check if the column isShared is equal to 1 and if is not equal to 1 or its 0 than change it to 1

Stefce 146 Posting Pro

Yes but how can i update when the selection fail ?
And also now giving me error Fatal error: Call to a member function fetch_assoc() on boolean in C:\xampp\htdocs\Upstrey\home.php on line 496
the line 496 is 6th in the code above.

Stefce 146 Posting Pro

Hello everyone i have a little problem over here im making share button so i want to update the database on the column 'isShared' with value 1 so here is my code but it doesnt work, all the time is showing me Already shared ticket!

Here is the code:

if(isset($_POST['share'])) {
    $user = getUserData('kladilnica', 'Username');
    $shared1 = getUserData('kladilnica', 'isShared');
    $sql = "SELECT `isShared` FROM kladilnica WHERE Username='".$user."'";
    $result = $conn->query($sql);
    while($row = $result->fetch_assoc()) {
        $shared = $row["isShared"];
        if($shared == 1){
            echo "<b>Already shared ticket!</b>";
        } else if($shared == 0){
            echo "<b>Ticket shared succesfully.</b>";
        }
    }
}

Btw if someone knows a better way of making share button please tell in the comments i got this solution on my own.. thank you very much :)

Stefce 146 Posting Pro

Thank you for your fast replying but i doesn't quite get it i need just the first one right ? And can i use it like this example ?

$tip1 = htmlentities($_POST['tip1']);

$asd = sanitize($tip1);

cleanInput($asd);
Stefce 146 Posting Pro

Hello guys i have a big problem over here and and wierd i think, when im trying to add some info into database it works well i have 32 input fields (16 for matches and 16 for match tips) and when i will enter in each some info for ex. asdasdasd it works fine it saves the data into the table but when i will add some football matches like Cobreloa - O'Higgins i get a error

Fatal error: Wrong SQL: INSERT INTO kladilnica VALUES ('', 'StefanRafa', '30', '11422', '02/05/2015', 'Heracles Alm - Groningen', 'Cobreloa - O'Higgins', 'Boavista SC - Cabofriense', 'Equat. Guine - Ghana', 'Ajax - AZ Alkmaar', 'Friburguense - Macae', 'Palmeiras - Ponte Preta', 'Palestino - Nacional M.', '', '', '', '', '', '', '', '', '', 'T1 2+', 'T1 2+', '2 - 3', '2 - 3', '1 - 1 3+', '2 - 3', '0 - 2', '2 - 3', '', '', '', '', '', '', '', '', '184625', '1') Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Higgins', 'Boavista SC - Cabofriense', 'Equat. Guine - Ghana', 'Ajax - AZ Alkmaa' at line 1 in C:\xampp\htdocs\ticket.php on line 308

please someone tell me what is causing this error and how can i fix it thanks very much :)

Stefce 146 Posting Pro

I play Counter Strike 1.6 sometimes when its way too much boring and there is not more "work" for me :P

Stefce 146 Posting Pro

Hello everyone i want to make a random number generator and also to check the numbers, and if that number exist in the database than to generate other number... thank you :)

Stefce 146 Posting Pro

Thanks alot and i have another question, why the autosuggestion works just on the first field and not in others?

Stefce 146 Posting Pro

@pixelsoul wow this actualy really helped thanks alot men and like i said DaniWeb for life :D :D

Stefce 146 Posting Pro

Hello everyone have a nice day or night where ever you are so i hope i will have a great night if i fix this problem i have right here :D i have a array list with some match tips and i have a 16 input fields so i want to make autosuggestion when i will write the first letter of any array item i searched the internet but i just cannot figure out. Thanks for your help DaniWeb for life :D :D here is my array

$tips = array("1", "2", "x", "1-1", "1-x", "x-1", "1-2", "2-1", "2-x", "x-2");
Stefce 146 Posting Pro

Opss the problem was in the <form> i delited the form with the matches fields and now works fine... but now i have other problem i do not know how to place the fields in the position i want to be and thats the right side of the box

Here is the box im using right now http://jsfiddle.net/

Stefce 146 Posting Pro

yup i know that but i dont know the way of doing that in mysqli. When i type that into SQl in phpmyadmin i get small table with this results how can i show the results you are asking for ?

kladilnica
CREATE TABLE `kladilnica` (
 `ID` int(11) NOT NUL...
Stefce 146 Posting Pro

connect.php

<?php
    $DBServer = 'localhost';
    $DBUser   = 'root';
    $DBPass   = '';
    $DBName   = 'upstrey';

    $conn = new mysqli($DBServer, $DBUser, $DBPass, $DBName);

    if ($conn->connect_error) {
        die("Connection failed: " . $conn->connect_error);
    }
?>

But i think this is not the problem because like i said when i will remove the matches the code works just fine...

EDITED: the match fields are in other <form> maybe that is the problem ?
i putted in other form because it was eazyer to place in position if someone know better way of doing this please share it :)

<form action="ticket.php" method="POST" style="position: absolute; margin-left: 15px;">
                        <a id="title_text"><b>Sport Ticket</b></a>
                        <p><input id="mAmouth" type="text" name="amouth" placeholder="Amount Of Payment?"/></p>
                        <input id="mAmouth" type="text" name="gain" placeholder="Gain?"/>

                        <p><input type="text" name="date" id="datepicker" placeholder="Date?"><input type="text" name="koef" id="koef" placeholder="Odds?"></p>
                        <input id="place_ticket" type="submit" value="Place Ticket" onclick="myFunction()"/><br><br>
                    </form>
                    <form method="POST" style="position: relative; margin-left: 325px;">
                        <input type="text" name="match1" id="match" placeholder="Match?">
                        <input type="text" name="match2" id="match" placeholder="Match?"><br>
                        <input type="text" name="match3" id="match" placeholder="Match?">
                        <input type="text" name="match4" id="match" placeholder="Match?"><br>
                        <input type="text" name="match5" id="match" placeholder="Match?">
                        <input type="text" name="match6" id="match" placeholder="Match?"><br>
                        <input type="text" name="match7" id="match" placeholder="Match?">
                        <input type="text" name="match8" id="match" placeholder="Match?"><br>
                        <input type="text" name="match9" id="match" placeholder="Match?">
                        <input type="text" name="match10" id="match" placeholder="Match?"><br>
                        <input type="text" name="match11" id="match" placeholder="Match?">
                        <input type="text" name="match12" id="match" placeholder="Match?"><br>
                        <input type="text" name="match13" id="match" placeholder="Match?">
                        <input type="text" name="match14" id="match" placeholder="Match?"><br>
                        <input type="text" name="match15" id="match" placeholder="Match?">
                        <input type="text" name="match16" id="match" placeholder="Match?"><br>
                    </form>
Stefce 146 Posting Pro

Here is the whole script so if anyone know what is wrong here ?
Also when i will delete the matches from the query and let just ID username betamouth gain and date it works fine.

<?php
    if(
    isset($_POST['date']) &&
    isset($_POST['gain']) &&
    isset($_POST['amouth']) &&  
    isset($_POST['match1']) && 
    isset($_POST['match2']) && 
    isset($_POST['match3']) && 
    isset($_POST['match4']) && 
    isset($_POST['match5']) && 
    isset($_POST['match6']) &&
    isset($_POST['match7']) && 
    isset($_POST['match8']) && 
    isset($_POST['match9']) && 
    isset($_POST['match10']) && 
    isset($_POST['match11']) && 
    isset($_POST['match12']) &&
    isset($_POST['match13']) && 
    isset($_POST['match14']) && 
    isset($_POST['match15']) && 
    isset($_POST['match16']) &&
    isset($_POST['koef'])) {
        $match1 = $_POST['match1'];
        $match2 = $_POST['match2'];
        $match3 = $_POST['match3'];
        $match4 = $_POST['match4'];
        $match5 = $_POST['match5'];
        $match6 = $_POST['match6'];
        $match7 = $_POST['match7'];
        $match8 = $_POST['match8'];
        $match9 = $_POST['match9'];
        $match10 = $_POST['match10'];
        $match11 = $_POST['match11'];
        $match12 = $_POST['match12'];
        $match13 = $_POST['match13'];
        $match14 = $_POST['match14'];
        $match15 = $_POST['match15'];
        $match16 = $_POST['match16'];
        $odd = $_POST['koef'];
        $betAmouth = $_POST['amouth'];
        $gain = $_POST['gain'];
        $date = $_POST['date'];

        if (!is_numeric($betAmouth) || !is_numeric($gain))  {
            echo "Must enter a number!";
        } else {
            if(empty($betAmouth) || empty($gain) || empty($date)){
                echo "You can't leave empty fields.";
            } else {
                $getUsername = getUserData('Username');

                $sql = "INSERT INTO `kladilnica` VALUES ('', '".$getUsername."', '".$betAmouth."', '".$gain."', '".$date."', '".$match1."', '".$match2."', '".$match3."', '".$match4."', '".$match5."', 
                '".$match6."', '".$match7."', '".$match8."', '".$match9."', '".$match10."', '".$match11."', '".$match12."', '".$match13."', 
                '".$match14."', '".$match15."', '".$match16."', '".$odd."')";

                if($conn->query($sql) === false) {
                    trigger_error('Wrong SQL: ' . $sql . ' Error: ' . $conn->error, E_USER_ERROR);
                } else {
                    $last_inserted_id = $conn->insert_id;
                    $affected_rows = $conn->affected_rows;
                    echo "Ticket added successfully.";
                }
            }
        }
    }
?>
Stefce 146 Posting Pro

yup they are 16 input fields and i tryed in the phpmyadmin and it works but with the code i have doesn't work and i do not have any errors, maybe there are too much fields to be updated or something else is the problem ?

Stefce 146 Posting Pro

I have a little problem over here this code doesn't work well what is the problem if anyone know ?

$getUsername = getUserData('Username');
$sql = "INSERT INTO `kladilnica` VALUES ('', '".$getUsername."', '".$betAmouth."', '".$gain."', '".$date."', '".$match1."', '".$match2."', '".$match3."', '".$match4."', '".$match5."', 
'".$match6."', '".$match7."', '".$match8."', '".$match9."', '".$match10."', '".$match11."', '".$match12."', '".$match13."', 
'".$match14."', '".$match15."', '".$match16."', '".$odd."')";

if($conn->query($sql) === false) {
    trigger_error('Wrong SQL: ' . $sql . ' Error: ' . $conn->error, E_USER_ERROR);
} else {
    $last_inserted_id = $conn->insert_id;
    $affected_rows = $conn->affected_rows;
    echo "Ticket added successfully.";
}

And also if someone can tell me how i can insert values into two tables using query ?

Stefce 146 Posting Pro

anyone ?

Stefce 146 Posting Pro

Hello is there a way of checking the input field have a value but with out clicking a button, for ex. if i write any letter inside the field to give me result for example hello or something else...

Stefce 146 Posting Pro

Ok now i dont get any error but the receiver payCheck field is updating just with the number they send to him.

Stefce 146 Posting Pro

It doesn't work i tryed different ways of that but neither works.. so im asking everyone who can help me with this problem does i can contact with she/him on Skype ? Facebook ? so i can get a better response from the helper. Thank you very much.
My skype is: stefanrafaa
and facebook: Facebook

Stefce 146 Posting Pro

@Traevel can you help or anyone else ?
also that with the $count is fixed dont look it
And also Uplata is done, so just reciver_id session variable

Stefce 146 Posting Pro

I solved it with reseting the account settings, that helped.

Stefce 146 Posting Pro

Where can i check that ?

Stefce 146 Posting Pro

How do i know where is my error and how do i fix it ? :/
My index.php file is simple with redirecting code

<?php
    require 'connect.php';
    require 'core.php';

    if(loggedin()) {
        header('Location: home.php');
    } else {
        header('Location: login.php');
    }
?>
Stefce 146 Posting Pro

is there any difference in file.inc.php and file.php ? i though its because that but its not i have changed the files but not helping..

Stefce 146 Posting Pro

I uploaded the files into my hosting server and im getting this error when i want to open my site what is the problem ? Im using index.php but i think that should not be the problem ?