
Phpnewbie23
Members-
Posts
42 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
Phpnewbie23's Achievements

Member (2/5)
0
Reputation
-
Cheers MadTechie that fixed it
-
I am trying to include PHP_HTTP.dll. I have put it in my ext file location and included in my extensions in the php.ini But i am getting this error message when i load my php.ini or and script PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP\ext\php_http.dll' - The specified module could not be found. in Unknown on line 0 I have googled it but all the errors seem to be about on install. Cheers
-
Hi Maq Its a web service API for Vembu StoreGrid WebServices API i have the api list but no idea where to start. Cheers James
-
Hi Guys I was wondering if someone could help me in pointing me in the right. Direction of using PHP with APIs. Cheers James
-
Thanks taquitosensei i did try this while i was testing after i posted the this and same error. Thanks James
-
Hi Guys I keep getting With this code <?php include 'db_conn.php'; include 'define.php'; echo "<br>"; echo "<form method='POST' action='http://localhost/backup-report/test.html'>"; //javascript/popup/addpopup.js'>"; echo "select Client:<select name='Client'>"; foreach($clients as $client){ echo "<option value='1'>$client</option>"; } echo "</select>"; echo"<br>"; echo "<table id='table'>"; echo "<tr>"; echo "<td align=center>Type client name</td>","\n"; echo "<td align=center><input type='Text' value='Type Customer Name' /> </td>","\n"; echo "<td align=center><input type='Submit' value='Submit' /> </td>","\n"; echo "</tr>"; echo "</table>"; echo "</form>"; echo"<br>"; echo "<form action='rempopup.js' method='POST'>"; echo "<table id='table'>"; echo "<tr>"; echo "<td align=center>Type client name</td>","\n"; echo "<td align=center><input type='Text' value='Type Customer Name' /> </td>","\n"; echo "<td align=center><input type='Submit' value='Remove' /> </tdn";>","\n echo "</tr>"; echo "</table>"; echo "</form>"; ?> This happens when i click on the <?php echo "<td align=center><input type='Submit' value='Submit' /> </td>","\n"; ?> which should then run a .js script that dispalys a windows that runs the remove script that removes the customer from the define.php which builds the array All help greatly appricated any ideas????? Cheers James
-
Thanks Yesideez yes that is sorted just but unfortnatly not need as i found out. Last night i just need this blooming combo box to sort out ahhhhhh
-
Yes good suggestion lonewolf217 but we could be adding/deleting new clients. I wanted a easy and user friendly way for users to delete and add customers as not all the users are PC friendly
-
Thanks lonewolf217 The issue i have just worked out is what i planned to do will not work at all...... GRRRRRRR > My Idea now is to create a text file with all clients names in it. Somehow populate the combo box with the clients names in php. Then on selecting Z company so the data for that company. Any ideas anyone i keep drawing blanks. Cheers James
-
Thanks for the quick reply i tried which worked a treat.. thanks for that. My next issue i would like the combo box values to be shown alphabetical but my code below show this <--------------> Combo Item 1 Dog Combo Item 2 Dog Combo Item 3 Dog Combo Item 4 Dog Combo Item 5 Cat Combo Item 6 Cat Combo Item 7 Cat Combo Item 8 Cat Combo Item 9 Tree Combo Item 10 Tree Combo Item 11 Tree Combo Item 12 Tree <--------------> <?php include 'db_conn.php'; echo "<br>"; echo "<form action='index.php' method='POST'>"; echo "Client: <select name='Client'>"; while(odbc_fetch_row($rs)){ //($rs, $rownumber=0)) //(odbc_fetch_row($rs)) // array($rs) $client=odbc_result($rs,"BACKUP_LOCATION"); $alpha[] = odbc_fetch_row($rs); sort($alpha); foreach ($alpha as $key => $val) { $val = str_ireplace('D:/', '', $client); echo "<option value='null'>$val</option>"; } } echo '</select>'; ?> Again all help well appricated. Cheers James
-
I am trying to remove the D:/ from an combo box populate by a ODBC connection. I have tired trim which seemed to work. But removed the D's from some of my values inside the combo box. See Example 1 Example using <?php $val = trim($client, 'D:/'); ?> <-----------> Combox Item1 D:/Dog Combox Item2 D:/Cat Combox Item2 D:/Tree <-----------> Example OutPut <-----------> Combox Item1 og Combox Item2 Cat Combox Item2 Tree <-----------> After that i tired substr Example using <?php echo substr($client,3); ?> <-----------> Combox Item1 D:/Dog Combox Item2 D:/Cat Combox Item2 D:/Tree <-----------> Example OutPut <-----------> Combox Item1 D:/Dog Combox Item2 D:/Cat Combox Item2 D:/Tree <-----------> Using trim i get the kind of result i am looking for but cannot work out why some of my values that start with a D for example Dog are removed. After that i would like to have my combo box values sorted alphabetically my code is kind of messed up has i have had a go at both and nearly got it working all help well appricated <?php include 'db_conn.php'; echo "<br>"; echo "<form action='index.php' method='POST'>"; echo "Client: <select name='Client'>"; while(odbc_fetch_row($rs)){ //($rs, $rownumber=0)) //(odbc_fetch_row($rs)) // array($rs) $client=odbc_result($rs,"BACKUP_LOCATION"); //$alpha[] = odbc_fetch_row($rs); //sort($alpha); //foreach ($alpha as $key => $val) { //$val = trim($client, 'D:'.'); echo substr($client,3); echo "<option value='null'>$client</option>"; } //} echo '</select>'; ?> Cheers James
-
Does anyone know how i could resolve this please.... Cheers phpnewbie
-
That was just the PHP code thats why there is not 96 lines. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Vembu StoreGrid Backup Moniter</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="styles.css" type="text/css" /> <script type="text/javascript" language="JavaScript" src="./javascript/overlib.js"></script> <script type="text/javascript" language="JavaScript" src="./javascript/overlib_positioncap.js"></script> <script type="text/javascript" language="JavaScript" src="./javascript/overlib_centerpopup.js"></script> <script type="text/javascript" language="JavaScript" src="./javascript/overlib_followscroll.js"></script> </head> <body> <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div> <h1>Goldfield Backup Schedule <?php echo date("d/m/Y"); ?> </h1> <hr /> <div id="menucase"> <div id="stylefour"> <ul> <li><a href="http://www.vembu.com/" target="_blank">Vembu Website </a></li> <li><a href="http://www.vembu.com/forum/viewforum.php?f=1" target="_blank">Vembu Forum</a></li> <li><a href="http://www.vembu.com/technical-support.html" target="_blank">Vembu Support</a></li> <li><a href="SQLMoveLog.php">SQL Copy Log</a></li> <li><a href="Tools.php">Tools/Links (Under Construction)</a></li> </ul> </div> </div> <br> <p> Welcome to the Goldfield backup moniter. This moniter enables you to establish which clients have backed up or have not. If you have any problem please <a style="color: #000000" href= "mailto:[email protected]?subject=Vembu-Moniter"><u>click here</u> to contact me.</a><br /> <br> <u>Key:</u> <br /> <br /> <img src="./images/success-icon.gif"> Passed. <img src="./images/warning-icon.gif"> Backup Completed Partially. <img src="./images/error-icon.gif"> Failed. <br /> <br /> </p> <br> <?php include 'bytes.php'; //include 'smtp.php'; $color1 = "#FFFFCC"; $color2 = "#FFFFFF"; $row_count = 0; $conn=odbc_connect('STOREGRID','',''); if (!$conn) {exit("Connection Failed: " . $conn);} $sql="SELECT * FROM INCREMENTAL_BACKUP_REPORT"; $rs=odbc_exec($conn,$sql); if (!$rs) {exit("Error In SQLITE Connection To Database");} $row_color = ($row_count % 2) ? $color1 : $color2; echo "<table id='table'>"; echo "<tr>"; echo "<th align=center><small>Client</small</th>"; echo "<th align=center><small>Backup Name</small></th>"; echo "<th align=center><small>Start Time</small></th>"; echo "<th align=center><small>End Time</small></th>"; echo "<th align=center><small>Skipped Files</small></th>"; echo "<th align=center><small>Files Added</small></th>"; echo "<th align=center><small>Files Deleted</small></th>"; echo "<th align=center><small>Files Modified</small></th>"; echo "<th align=center><small>Orignal File Size</small></th>"; echo "<th align=center><small>Disk Space Used</small></th>"; echo "<th align=center><small>Bandwidth Used</small></th>"; echo "<th align=center><small>Backup Status</small></th>"; echo "</tr>"; while (odbc_fetch_row($rs)) { $row_color = ($row_count % 2) ? $color1 : $color2; $client=odbc_result($rs,"CLIENT_NAME"); $backupname=odbc_result($rs,"BACKUP_NAME"); $start_time=odbc_result($rs,"BACKUP_START_TIME"); $end_time=odbc_result($rs,"BACKUP_END_TIME"); $skipfiles=odbc_result($rs,"NO_OF_FILES_SKIPPED"); $filesadded=odbc_result($rs,"NO_OF_FILES_ADDED"); $filedeleted=odbc_result($rs,"NO_OF_FILES_DELETED"); $filemodified=odbc_result($rs,"NO_OF_FILES_MODIFIED"); $fileoriginal=odbc_result($rs,"ORIGINAL_FILE_SIZE"); $diskspace=odbc_result($rs,"DISK_SPACE_USED"); $bandwidth=odbc_result($rs,"BANDWIDTH_USED"); $remarks=odbc_result($rs,"REMARKS"); echo "<tr>"; echo "<td bgcolor=$row_color nowrap align=center><small>$client</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$backupname</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>" . date("l d/m/Y H:i:s", $start_time) . "</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>" . date("l d/m/Y H:i:s", $end_time) . "</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$skipfiles</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$filesadded</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$filedeleted</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$filemodified</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>". ByteSize($fileoriginal) . "</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small> ". ByteSize($diskspace) . "</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>". ByteSize($bandwidth) . "</small></td>","\n"; if ($remarks=="Success"){ echo "<td bgcolor=$row_color align=center><small><a href=\"javascript:void(0);\"<img border'0' src='./images/success-icon.gif' align='center' onmouseover=\"return overlib('$remarks',STICKY, MOUSEOFF);\"></a> \n"; }else if ($remarks=="Backup Completed Partially."){ echo "<td bgcolor=$row_color align=center><small><a href=\"javascript:void(0);\"<img border'0' src='./images/warning-icon.gif' align='center' onmouseover=\"return overlib('$remarks',STICKY, MOUSEOFF);\"></a> \n"; }else{ echo "<td bgcolor=$row_color align=center><small><a href=\"javascript:void(0);\"<img border'0'src='./images/error-icon.gif' align='center' onmouseover=\"return overlib('$remarks',STICKY, MOUSEOFF);\"></a> \n"; echo "</tr>"; } $row_count++; } echo "</table>"; echo"<br>"; odbc_close($conn); ?> </body> </html> The INCREMENTAL_BACKUP_REPORT table is 4403 records. Cheers james
-
Here is the the PHP code <?php include 'bytes.php'; //include 'smtp.php'; $color1 = "#FFFFCC"; $color2 = "#FFFFFF"; $row_count = 0; $conn=odbc_connect('STOREGRID','',''); if (!$conn) {exit("Connection Failed: " . $conn);} $sql="SELECT * FROM INCREMENTAL_BACKUP_REPORT"; $rs=odbc_exec($conn,$sql); if (!$rs) {exit("Error In SQLITE Connection To Database");} $row_color = ($row_count % 2) ? $color1 : $color2; echo "<table id='table'>"; echo "<tr>"; echo "<th align=center><small>Client</small</th>"; echo "<th align=center><small>Backup Name</small></th>"; echo "<th align=center><small>Start Time</small></th>"; echo "<th align=center><small>End Time</small></th>"; echo "<th align=center><small>Skipped Files</small></th>"; echo "<th align=center><small>Files Added</small></th>"; echo "<th align=center><small>Files Deleted</small></th>"; echo "<th align=center><small>Files Modified</small></th>"; echo "<th align=center><small>Orignal File Size</small></th>"; echo "<th align=center><small>Disk Space Used</small></th>"; echo "<th align=center><small>Bandwidth Used</small></th>"; echo "<th align=center><small>Backup Status</small></th>"; echo "</tr>"; while (odbc_fetch_row($rs)) { $row_color = ($row_count % 2) ? $color1 : $color2; $client=odbc_result($rs,"CLIENT_NAME"); $backupname=odbc_result($rs,"BACKUP_NAME"); $start_time=odbc_result($rs,"BACKUP_START_TIME"); $end_time=odbc_result($rs,"BACKUP_END_TIME"); $skipfiles=odbc_result($rs,"NO_OF_FILES_SKIPPED"); $filesadded=odbc_result($rs,"NO_OF_FILES_ADDED"); $filedeleted=odbc_result($rs,"NO_OF_FILES_DELETED"); $filemodified=odbc_result($rs,"NO_OF_FILES_MODIFIED"); $fileoriginal=odbc_result($rs,"ORIGINAL_FILE_SIZE"); $diskspace=odbc_result($rs,"DISK_SPACE_USED"); $bandwidth=odbc_result($rs,"BANDWIDTH_USED"); $remarks=odbc_result($rs,"REMARKS"); echo "<tr>"; echo "<td bgcolor=$row_color nowrap align=center><small>$client</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$backupname</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>" . date("l d/m/Y H:i:s", $start_time) . "</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>" . date("l d/m/Y H:i:s", $end_time) . "</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$skipfiles</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$filesadded</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$filedeleted</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>$filemodified</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>". ByteSize($fileoriginal) . "</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small> ". ByteSize($diskspace) . "</small></td>","\n"; echo "<td bgcolor=$row_color align=center><small>". ByteSize($bandwidth) . "</small></td>","\n"; if ($remarks=="Success"){ echo "<td bgcolor=$row_color align=center><small><a href=\"javascript:void(0);\"<img border'0' src='./images/success-icon.gif' align='center' onmouseover=\"return overlib('$remarks',STICKY, MOUSEOFF);\"></a> \n"; }else if ($remarks=="Backup Completed Partially."){ echo "<td bgcolor=$row_color align=center><small><a href=\"javascript:void(0);\"<img border'0' src='./images/warning-icon.gif' align='center' onmouseover=\"return overlib('$remarks',STICKY, MOUSEOFF);\"></a> \n"; }else{ echo "<td bgcolor=$row_color align=center><small><a href=\"javascript:void(0);\"<img border'0'src='./images/error-icon.gif' align='center' onmouseover=\"return overlib('$remarks',STICKY, MOUSEOFF);\"></a> \n"; echo "</tr>"; } $row_count++; } echo "</table>"; echo"<br>"; odbc_close($conn); The php code connects to a ODBC sqlite database collects the information and provides it in a table for the user to view. Thanks James
-
Hi Guys Hopefully someone can help me i thought. TODAY i will have finshed my first PHP project but i get this error. PHP Fatal error: Out of memory (allocated 262144) (tried to allocate 4294967293 bytes) in C:\Inetpub\wwwroot\Backup-Report\index.php on line 96 Please help me ..... have changed my memory limit in the php.ini and dont know what else to do HELP.......