[Solved] File upload time limitation [closed]

Just maintain a field in database which saves the last file upload date and time and if the uploads reach to the limit of 5 then before uploading file check that last file upload time. If the difference between last file upload time and current time is greater than 2 minutes then allow the file … Read more

[Solved] How to put Image into directory imagejpeg()? [closed]

You have to choose between the two – either show the image or save it to directory. You cant do both. imagejpeg($gd_object); //shows the image, requires content-type to be image/jpeg imagejpeg($gd_object, $filepath); //saves the image, to $filepath You can try to save the image and then redirect the use to the image if you want … Read more

[Solved] how to put value in buttons? [closed]

So this is very crude, but it is one way you can do what you are trying to do: <table> <?php while($row=mysql_fetch_array($check2)) { ?> <tr> <td><?php echo $row[‘wTitle’]; ?></td> <td>Click to edit</td> </tr> <tr> <td style=”text-align:right;”><?php echo $row[‘wContent’]; ?></td> </tr> <tr> <td colspan=”2″ height=”202″>&nbsp;</td> </tr> <tr> <td colspan=”2″> <form action=”view.php” method=”post”> <input type=”submit” name=”submit” value=”edit” … Read more

[Solved] CREATE SEQUENCE IN MYSQL [closed]

Assuming you’re going to Oracle, just set up the statement, parse, and execute. There’s no need to do any binding because you have no bind variables. This is adapted from the PHP documentation of oci_parse: $conn = oci_connect(your username, your password, your database); $stid = oci_parse($conn, ‘UPDATE tableName SET columnName = seq_test_id.NEXTVAL’); oci_execute($stid); 4 solved … Read more

[Solved] How to do i create a unique page for each row in database with PHP?

You could try something like this to generate “different” page using one file only(example.com/title.php) Loop through your database to get all data while creating a <a> for each of them: foreach ($retrieveResult as $result) { echo ‘<a href=”https://stackoverflow.com/questions/44427393/example.com/title.php?name=”.$result[“title’].'”>’.$result[‘title’].'</a>’; } This will generate something like this: <a href=”https://stackoverflow.com/questions/44427393/example.com/title.php?name=titleA”>titleA</a> <a href=”example.com/title.php?name=titleB”>titleB</a> <a href=”example.com/title.php?name=titleC”>titleC</a> <a href=”example.com/title.php?name=titleD”>titleD</a> To get … Read more

[Solved] Using HTML forms with a PHP script [closed]

The action attribute of the form tag directs the browser to where you want to send your form data. To direct the browser to a PHP script, just change the action attribute in your code to the PHP script you’d like to send your data to. <form action=”my_php_file.php”> solved Using HTML forms with a PHP … Read more

[Solved] Fetch the products URL [closed]

There are many ways to get XML from a URL – perhaps the simplest is using simplexml_load_file : $xml = simplexml_load_file($url); print_r($xml); Where obviously $url is your URL. You can add the username and password into the URL like http://username:password@url/ Or you could use cURL and then simplexml_load_string to parse the results: $ch = curl_init(); … Read more

[Solved] Radio Button not working [closed]

This line is missing a comma: $Query .= “banner_images=””.$banner_images.”””; should be $Query .= “banner_images=””.$banner_images.””,”; As a sidenote, you are vulnerable to sql injection with your code, you might want to use prepared statements or at least mysql_real_escape_string 3 solved Radio Button not working [closed]

[Solved] sql/php syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting [closed]

You lost track of all needed ‘ and additionally forgot to quote username value. So instead of $result = mysql_query(“update Users set lat=”$lat”,lon=’$lng’ where username=$_SESSION[‘username’]”); do this in more clean manner: $result = mysql_query( “update Users set lat=”$lat”,lon=’$lng’ where username=”” . $_SESSION[“username’] . “‘”); or even better: $query = sprintf(“update Users set lat=”%s”,lon=’%s’ where username=%s”), … Read more