[Solved] Cant locate SQL syntax error in basic email tracking pixel [closed]

You appear to have an extra comma at the end: INSERT INTO email_table VALUES (‘$CAMPAIGN’, ‘$IP’,) Try: INSERT INTO email_table VALUES (‘$CAMPAIGN’, ‘$IP’) BTW, I won’t judge your code too much but tracking people by IP is not very reliable. For example, a lot of corporate traffic behind company firewalls can use the same IP … Read more

[Solved] INSERT statement does not work [closed]

“condition” is a MySQL reserved word. If you have to use it as a column name wrap it in backticks (`) EDIT And escape any strings that you’re planning on storing in the database. That allows the db to handle quotes (‘) in the actual string itself. As suggested by Joop, using prepared statements avoids … Read more

[Solved] Updating php values using jquery

If you are using sessions, you will need an ajax call that will call a php file within the session that will update a particular session variable. The issue at hand though is that it would not be an update until the next time the base page was loaded since that information would need to … Read more

[Solved] Bypassing cross origin policy using JQuery/javascript with no access to remote server

If you don’t wanna install PHP to do this, why did you tag with php? You need to use a Server Side Script like Proxy PHP file, that reads the content and executes it correctly. Proxy.php: <?php header(“Content-type: application/json”); die(file_get_contents($_GET[“url”])); ?> And call it like this: url: “proxy.php?url=http://gov.uk/blah/blah” solved Bypassing cross origin policy using JQuery/javascript … Read more

[Solved] Thank you for helping [closed]

actually this is not good practice to insert the value in the database. i recommend always use something like this. $sqlQ=”insert into users (tableField,tableField1) values (‘$value’,’$value1′)”; Note:never put auto increment field name OR value in the query.and always use prepared statements to avoid sql injection attack.given code is also vulnerable.if you do not know about … Read more

[Solved] How to get html code from url using method get? [closed]

can you be more specific or post your code? i tried something like this and it works: <?php $html=file_get_contents(“http://www.google.com”); echo $html; ?> to use get method you can add your get params to the url you ar calling like this: <?php $html=file_get_contents(“http://yoururl.com?param1=value&param2=value”); echo $html; ?> 2 solved How to get html code from url using … Read more

[Solved] What Is Active db in CodeIgniter? [closed]

I think it’s Active Record not Active DB. Active Record is a One kind of design pattern used for retrieve, insert, and update your database with minimal scripting. You will find more about this in the bellow link https://www.codeigniter.com/userguide2/database/active_record.html 1 solved What Is Active db in CodeIgniter? [closed]

[Solved] how to create a dynamic login page [closed]

Here is a sample code for login.. if(isset($_POST[‘login’])) { $email=$_POST[’email’]; $pwd=$_POST[‘pwd’]; $sel_query=mysqli_query(“SELECT id,Email,Password,LastLogin FROM tableName WHERE Email=”$email” AND Password=’$pwd'”); if(mysqli_num_rows($sel_query)==0) { echo “Email ID or Password are Incorrect. Please try again”; } else { echo “Logged In Successfully”; } } solved how to create a dynamic login page [closed]

[Solved] How to create xml files using php [closed]

If you googling than also meet the answer but also check below code ‘); $node->addChild(‘content’, $text); $xml = $node->asXML(); file_put_contents(‘sample.xml’, $xml); } $xml = simplexml_load_file(‘sample.xml’); $text = htmlspecialchars($xml->content); ?> <html> <head> <title>HTML data: Storing in XML, editing with CKEditor</title> <script type=”text/javascript” src=”https://stackoverflow.com/questions/27653081/ckeditor/ckeditor.js”></script> </head> <body> <!– Our page editing form –> <form action=”” method=”post”> <textarea name=”editor1″> … Read more

[Solved] How do I use PHP to apply css properties? [closed]

This is what you’re asking for, but it isn’t best practice and I wouldn’t recommend it. I would refer you to @nietonfir’s suggestion (despite being a little harsh, he/she is right). Doing mobile stuff in CSS as a part of a responsive design (media queries) is soooooo much better and easier. <?php if ($mobile == … Read more

[Solved] Count down timer in php with database [closed]

You can store the target time in Mysql and you can fetch that target time in PHP and assign it to Javascript code, so the javascript will show the countdown timer. For countdown timer you can take any jquery script from here: http://www.tripwiremagazine.com/2012/11/jquery-countdown-scripts.html solved Count down timer in php with database [closed]