Jump to content

jr8rdt

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jr8rdt's Achievements

Member

Member (2/5)

0

Reputation

  1. Hello I want to be able to use different sql statement based on the select option from the same form. a Venue has a single Region a Region has multiple Venues <tr> <td>Region</td> <td> <select name="Region"> <option value="r1">Region1</option> <option value="r1">Region2</option> <option value="r3">Region3</option> </select> </td> </tr> tr><td>Venue</td> <td><select name="Venue"> <?php $query_venue = "SELECT name FROM venue group by name ASC"; $result_venue = mysql_query($query_venue); while($row_venue = mysql_fetch_assoc($result_venue)) { echo "<option value =\"".$row_venue['name']."\">".ucfirst($row_venue['name'])."</option>"; } ?> </select></td></tr> <tr>
  2. Hello how to get file using sftp using php? I want users to be able to push software to their linux box via sftp (ftp is not allowed) the ssh2_sftp doesn't have push/send option. OR maybe I misunderstand ?? help. thanks
  3. I need to execute remote command using php. one of the possible solution is using ssh2_exec. however can't seem to find "change directory" capability using ssh2_exec. is there ? if this is true what are my choices ?
  4. I am using windows as for the php server. the htdoc directory is in c: drive the log is in d: drive how can I do it?
  5. I would like to get the file in d:\uploaded_logs\<directory_ based_on_chartID\filenames how to do that? $chart_id = $_REQUEST['id1']; $fp_mr = file('d:\uploaded_logs\' . $chart_id . '\Average.txt'); $fp_realtime = file('d:\uploaded_logs\' .$chart_id . '\grand.txt'); it doesn't work what is the correct way to do it ?
  6. hah....find the answer. You can't pass the the value twice. so I use only id1 and it works!
  7. still not working . the problem is when I run below program the url says ...chart.php?id1=17 why it is id1 and not id_chart id1 inside chart.php is 17 but when it is passed to a.php it is empty. it is understandable. so the question again is why the url is passing id1 and not id_chart?? id_chart has the correct value <?php $id_chart = $_REQUEST[id1]; echo $id_chart; ?> <html> <img src="a.php?id_chart=<?php echo $id_chart; ?>" border=0 align=center width =640 height=480> <p> <img src="b.php?id_chart=<?php echo $id_chart; ?>" border=0 align=center width =640 height=480> <p> <img src="c.php?id_chart=<?php echo $id_chart; ?>" border=0 align=center width =640 height=480> <p> <img src="d?id_chart=<?php echo $id_chart; ?>" border=0 align=center width =640 height=480> </html>
  8. still not working. I have tried in a.php: 1) echo $id_chart 2) $chart_id = $_REQUEST[id_chart]; echo $chart_id; both dont work.
  9. How to pass a value to multiple phps? I want to pass $id_chart to a.php, b.php, c.php, d.php all at once , automatically, without user interaction. a.php, b.php, c.php, d.php are graphics maker which take $id_chart to create graphs. <?php $id_chart = $_REQUEST[id1]; ?> <html> <img src="a.php" border=0 align=center width =640 height=480> <p> <img src="b.php" border=0 align=center width =640 height=480> <p> <img src="c.php" border=0 align=center width =640 height=480> <p> <img src="d.php" border=0 align=center width =640 height=480> </html>
  10. I want to have option value data derived from a mysql database instead of having to put it /hardcoded the value in the php code. I have the data in the database already. echo "<tr><td>User</td>"; echo "<td><select name='user'>"; echo "<option selected value='$user3'>$user3</option>"; echo "<option value='John'>John</option>"; echo "<option value='Kevin'>Kevin</option>"; echo "<option value='Jason'>Jason</option>"; echo "<option value='Pat'>Pat</option>"; echo "<option value='Jeff'>Jeff</option>"; echo "<option value='Paul'>Paul</option>"; echo "<option value='Chris'>Chris</option>"; can you explain how it would work and give me an example? Thanks
  11. Hello, I am taking over a web project whereby mysql is the database and phpmyadmin is used. the problem is access to phpmyadmin is not password protected so I am very nervous because we're very vulnerable for attack. how to activate and set password for access to phpmyadmin? thanks.
  12. Hello I need to do form input select. the easiest thing would be hardcoding the values. but this is headache to maintain/grow. the smarter and obvious way is to get the select option values from a database? but I am not quite sure how to do that . In addition I have multiple input select in 1 program (hardware, user, sofware, etc). other than using database what are my options? what about flat file or xml? <tr><td>Hardware</td> <td><select name="hw"> <option value="Dual-Core AMD Opteron Processor 8218">Dual-Core AMD Opteron Processor 8218</option> <option value="Proliant DL380">Proliant DL380</option> <option value="Proliant DL585">Proliant DL585</option> </select></td></tr> <tr><td>User</td> <td><select name="user">"; <option value='John'>John</option>"; <option value='Patrick'>Patrick</option>"; <option value='Kevin'>Kevin</option>"; <option value='Jason'>Jason</option>"; <option value='Glen'>Glen</option>"; <option value='Joe'>Joe</option>"; <option value='Dan'>Dan</option>"; <option value='Dennis'>Dennis</opt
  13. yes I did. but the extra empty lines are still there.
  14. This is the output. I miss what you're trying to do here. Array ( [server_id] => 1 [server_hostname] => dadaadam [server_ip] => 121.21.233.11 [server_status] => Active [server_os] => Windows Server 2003 [server_hw] => Dual-Core AMD Opteron Processor 8218 [server_sw] => S20 [server_user] => Junior [server_date] => 2007-06-01 13:38:29 [server_desc] => Test ) 1 Array ( [server_id] => 2 [server_hostname] => gdf3321 [server_ip] => 23.23.42.32 [server_status] => Active [server_os] => Windows Server 2003 [server_hw] => Dual-Core AMD Opteron Processor 8218 [server_sw] => BS1 [server_user] => Junior [server_date] => 2007-06-01 14:11:05 [server_desc] => ) 1
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.