landavia
Members-
Posts
140 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
landavia's Achievements
Newbie (1/5)
0
Reputation
-
try removeslash from the output!?
-
can show us whole script!?
-
i was thinking to add another sesion. u see.. u create name, password sesion.. include the time to expire. try put another sesion.. i would say todayWord if todayWord not match to todayWord (on database)... fail the script.. whole script
-
how about using a manual script everyday.. admin must click the script to manual remove the data
-
yap.. that's problem too well.. my teacher suggested me to use innodb
-
getting the _POST array to distinguish which button was clicked
landavia replied to Bird2819's topic in PHP Coding Help
please zip your work and upload here u know.. i kinda confuse about your logic.. perhaps we can fix it -
[SOLVED] Help with making a menu from a database table.
landavia replied to parodys's topic in PHP Coding Help
ur welcome and please remember.. since u still beginner.. don't think about security until u want publish it to NET -
<?php $folders = array ( 'images' ); if ( ! empty ( $_GET['s'] ) && in_array ( $_GET['s'], $folders ) ) { $folder = glob ( './' . $_GET['s'] . '/*' ); header ( 'Content-Type: application/xml' ); echo '<?xml version="1.0" encoding="ISO-8859-1"?>'; echo ' <filedata>'; echo ' <filecontents>'; echo implode ( "\r\n", $folder ); echo ' </filecontents>'; echo ' </filedata>'; } else { echo 1; } ?> your wish is my command sry.. copy-paste
-
i think i miss this one $save = "images/sml640_" . $imagepath; //This is the new file you saving $file = "images/" . $imagepath; //This is the original file before my code above
-
$sth1 = mysql_query("select HeartID, RunEvery, RunTime, ModCode from heartbeat where Enabled = 'Y'") or die ('Error: '.mysql_error ()); u have problem in here you should type $sth1 = mysql_query("select HeartID, RunEvery, RunTime, ModCode from heartbeat where Enabled like '%Y%'") or die ('Error: '.mysql_error ());
-
<?php if(isset($_POST['submit'])){ if (isset ($_FILES['new_image'])){ $imagename = $_FILES['new_image']['name']; $source = $_FILES['new_image']['tmp_name']; $target = "images/".$imagename; move_uploaded_file($source, $target); $imagepath = $imagename; $save = "images/" . $imagepath; //This is the new file you saving $file = "images/" . $imagepath; //This is the original file list($width, $height) = getimagesize($file) ; $modwidth = 1024; $diff = $width / $modwidth; $modheight = $height / $diff; $tn = imagecreatetruecolor($modwidth, $modheight) ; $image = imagecreatefromjpeg($file) ; imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height) ; imagejpeg($tn, $save, 100) ; $save = "images/sml_" . $imagepath; //This is the new file you saving $file = "images/" . $imagepath; //This is the original file list($width, $height) = getimagesize($file) ; $modwidth = 800; $diff = $width / $modwidth; $modheight = $height / $diff; $tn = imagecreatetruecolor($modwidth, $modheight) ; $image = imagecreatefromjpeg($file) ; imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height) ; imagejpeg($tn, $save, 100) ; } } ?><form action="<?php echo $_server['php-self']; ?>" method="post" enctype="multipart/form-data" id="something" class="uniForm"> <input name="new_image" id="new_image" size="30" type="file" class="fileUpload" /> <button name="submit" type="submit" class="submitButton">Upload/Resize Image</button> </form> <?php if(isset($_POST['submit'])){ echo "Large image: <img src='images/".$imagepath."'><br>"; echo "Thumbnail: <img src='images/sml_".$imagepath."'>"; } ?> about the script u combine all form and resize script on 1 file.. well that's nice but good.. btw.. u ask >>What additional code in need to put in it. u already built it.. u just change the value into 640 like below list($width, $height) = getimagesize($file) ; $modwidth = 640; $diff = $width / $modwidth; $modheight = $height / $diff; $tn = imagecreatetruecolor($modwidth, $modheight) ; $image = imagecreatefromjpeg($file) ; imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height) ; imagejpeg($tn, $save, 100) ;
-
getting the _POST array to distinguish which button was clicked
landavia replied to Bird2819's topic in PHP Coding Help
i don't take the word same vehicle name 1. plz add ENTER to your topic.. 2. instead using button.. try link while($row=mysql_fetch_assoc($sql_res)){ //echo all the names. echo "<a href=add_repair.php?name=$row["a_id"]>$row["a_name"]</a>"; //echo the send buttons } btw.. i kinda confuse.. can you zip your php work and database (export it)? so we can analyze -
<?php if ($route==London To Moscow) { //RUN A QUERY TO FIND DETAILS OF A PARTICULAR JOURNEY $query = " SELECT journey.journey_id FROM shuttle, journey WHERE shuttle.id = journey.shuttle_id and shuttle.depart_dttm = '$depart_dttm' and journey.route_id = 1 "; mysql_query($query); //GET THE JOURNEY ID $journey_id = mysql_insert_id(); //$row[journey_id ] /* PUT THE JOURNEY ID INTO THE PASSNGER TABLE TO SHOW THEY WILL BE ON THIS PART OF THE JOURNEY INSERT INTO passengers ($name, $journey_id) */ /*RUN A QUERY TO FIND DETAILS OF THE NEXT JOURNEY THAT MAKES UP THE COMPLETE TRIP*/ $query = " SELECT journey.journey_id FROM shuttle, journey WHERE shuttle.id = journey.shuttle_id and shuttle.depart_dttm = '$depart_dttm' and journey.route_id = 2 "; mysql_query($query); $journey_id = mysql_insert_id(); INSERT INTO passengers ($name, $journey_id) } ?> like that? but this is not finish yet.. u must have control 4 above query. if the 1st query FAIL is fine.. the data will not insert if the 2nd query FAIL.. u must FAIL the 1st too
-
oot .. catch(e) { //Internet Explorer try { xmlHttp = new ActiveXObject("Msxml2.HMLHTTP"); } catch(e) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } } are this js work? >>xmlHttp = new ActiveXObject("Msxml2.HMLHTTP"); ????